Rumah > Soal Jawab > teks badan
SpringBoot mybatis gradle 项目,使用分页pageHelper时,报了这么个错误。
分析了很久,试了很多方法,都没弄好。
@Bean
public PageHelper pageHelper(){
PageHelper pageHelper = new PageHelper();
Properties p = new Properties();
p.setProperty("dialect","postgresql");
p.setProperty("offsetAsPageNum", "true");
p.setProperty("rowBoundsWithCount", "true");
p.setProperty("reasonable", "true");
p.setProperty("params","pageNum=start;pageSize=limit;pageSizeZero=zero");
pageHelper.setProperties(p);
return pageHelper;
}
/**
* 分页获取所有定单
* @return
*/
@ResponseBody
@GetMapping(value = "list.json",produces = {"application/json;charset=UTF-8"})
public PageInfo<Map> orderList(Integer pageNum,Integer size){
PageHelper.startPage(pageNum == null ? 1 : pageNum,size == null ? 10 : size);
PageInfo<Map> list = amzOderService.getOrderList(baseQueryMap);
return list;
}