Public class ProductDetailDto implements Serializable {
Private Integer proId.
Private String proTitle;
Private BigDecimal proPrice;
Private Integer proNumber;
Private Boolean proIsHot;
Private Boolean proIsNew;
Private BigDecimal proSalePrice;
Private List ImgList=new ArrayList<> (a);
Private List
Private List
}
This is the inside of the dto, for example, I want to preach the past sizeList become array in the past, should write like this:
ModelAndView ModelAndView=new ModelAndView ();
ProductDetailDto ProductDetailDto=productService. GetOneProductByProId (proId);
If (productDetailDto==null) {
return null;
} else {
ModelAndView. AddObject (" product ", productDetailDto);
ModelAndView. AddObject (" size ", productDetailDto getSizeList (). The toArray ());
ModelAndView. SetViewName ("/admin/product/chooseProductImg ");
}
Return modelAndView.
So write words, is not an error, but is an object to the front desk after object address:
I feel should be the object not to rewrite the toString method, but I don't know how to change, could you tell me how to solve this problem? If I don't want to use the method of toArray,