mybatis分页插件PageHelper之springboot
1:pom添加依赖<dependency><groupId>com.github.pagehelper</groupId><artifactId>pagehelper-spring-boot-starter</artifactId></dependency>2:添加配置mybatis:mapper-locations: cla
·
1:pom添加依赖
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
</dependency>
2:添加配置
mybatis:
mapper-locations: classpath:mapper/*.xml
pagehelper:
# 指定数据库类型
helper-dialect: mysql
# pageNum < 1会查询第一页,pageNum > pages 会查询最后一页,
# 当pegeNum一直大于pages时会一直加载最后一夜数据这样影响前端数据,建议关闭
reasonable: false
params: count=countSql
support-methods-arguments: true
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐



所有评论(0)