当前使用版本(必填,否则不予处理)
3.3.2
该问题是如何引起的?(确定最新版也有问题再提!!!)
我明明设置size是5,为什么查询了10条数据出来,打印出来的sql也没有limit这类的分页语句,你们怎么搞的?
@RequestMapping("page")
public List
重现步骤(如果有就写完整)
@RestController @RequestMapping("/district") public class TDiDistrictController { @Autowired private ITDiDistrictService itDiDistrictService;
@RequestMapping("page")
public List<TDiDistrict> page(){
Page<TDiDistrict> page = new Page<>();
page.setCurrent(1);
page.setSize(5);
return itDiDistrictService.page(page).getRecords();
}
}
报错信息
2020-07-19 06:09:28.487 DEBUG 8260 --- [nio-8080-exec-1] c.e.d.g.m.TDiDistrictMapper.selectPage : ==> Preparing: SELECT id,nam,enam,country_id,city_id,county_id,create_id,create_time,modify_id,modify_time FROM t_di_district 2020-07-19 06:09:28.511 DEBUG 8260 --- [nio-8080-exec-1] c.e.d.g.m.TDiDistrictMapper.selectPage : ==> Parameters: 2020-07-19 06:09:28.538 DEBUG 8260 --- [nio-8080-exec-1] c.e.d.g.m.TDiDistrictMapper.selectPage : <== Total: 10
Comment From: huayanYu
建议你看下是否安装了分页插件。