Pagehelper分页查询助手
导入依赖
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.10</version>
</dependency>
作用:
只需要在调用mapper查询的时候(xml),在正上方使用 PageHelper.startPage(.getPage(),.getPageSize());
就会在xml的sql查询中自动插入limit
ps:为保证此功能的正常,返回的page<>类型最好明确类型