handler控制器如下
@ResponseBody
@RequestMapping("/sendCompose/object.json")
public ResultEntity<Student> testReceiveComposeObject(@RequestBody Student student){
logger.info(student.toString());
//将“查询”到的Student对象封装到ResultEntity中返回
ResultEntity<Student> resultEntity = ResultEntity.successWithData(student);
return resultEntity;
}
原因是ResultEntity没有写set和get方法。