小白跪求大神:前端post请求传复杂对象,SpringBoot后台的Controller接收不到List内的东西啊?!.在线急等~~~!
1.复杂对象为:
public class BaseAttrInfoVO implements Serializable {
private Long id;
private String attrName;
private Long catalog3Id;
private List<BaseAttrValue> baseAttrValueList;
private static final long serialVersionUID = 1L;
}
复杂对象中List里面的对象:BaseAttrValue为:
public class BaseAttrValue implements Serializable {
private Long id;
private String valueName;
private Long attrId;
private String isEnabled;
private static final long serialVersionUID = 1L;
}
2.Controller为(因为某些原因Controller必须用Resetful风格:):
@RestController
@RequestMapping("/shop/product")
public class ProductCategoryController {
@PostMapping("/savebaseattrinfoandbaseattrvalueobject")
public String saveBaseAttrInfoAndBaseAttrValueObject(BaseAttrInfoVO baseAttrInfoVO) {
this.productClient.saveBaseAttrInfoAndBaseAttrValueObject(baseAttrInfoVO);
return "success";
}
}