使用PageHepler分页

首先需要引入依赖

1 <dependency>
2             <groupId>com.github.pagehelper</groupId>
3             <artifactId>pagehelper-spring-boot-starter</artifactId>
4             <version>1.1.2</version>
5         </dependency>

然后再properties或者yml文件配置

1 pagehelper:
2   helperDialect: mysql
3   reasonable: false
4   supportMethodsArguments: true
5   params=count: countSql
PageHelper.startPage(page,size);
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.1.2</version>
</dependency>
posted @ 2019-01-23 15:46  帅的很耗cpu  阅读(373)  评论(0编辑  收藏  举报