Spring Boot在应用中分页失效的原因是什么?
发布时间
阅读量:
阅读量
现象:总共存在15条数据,在传递分页参数并执行查询操作后,系统依然返回全部15条记录。
原因1:若你所使用的代码中引用了如下依赖:
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>5.1.8</version>
</dependency>
那么需要进行相应的调整与优化:
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.10</version>
</dependency>
在YML配置文件中进行如下内容的添加:
#pagehelper分页插件配置
pagehelper:
全部评论 (0)
还没有任何评论哟~
