page类
public class Page {
private int page;
private int size;
public int getPage() {
return page;
}
public void setPage(int page) {
this.page = page;
}
public int getSize() {
return size;
}
public void setSize(int size) {
this.size = size;
}
}
QueryDto
public class Query {
private Page page;
public Page getPage() {
return page;
}
public void setPage(Page page) {
this.page = page;
}
}
控制器
@ResponseBody
@RequestMapping(value = "/index",method = RequestMethod.POST)
public Query index(@RequestBody Query query) {
return query;
}
报错
2022-10-19 15:02:06.787 WARN 19688 --- [nio-8888-exec-6] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing: public com.wanhuiyan.bean.Query com.wanhuiyan.controller.Test.index(com.wanhuiyan.bean.Query)]
这个是为啥