1、导入依赖:

com.github.pagehelper

pagehelper-spring-boot-starter

1.4.7

2、applicaltion.yml添加配置(顶格):

pagehelper:

propertyName: propertyValue

reasonable: false

defaultCount: true # 分页插件默认参数支持 default-count 形式,自定义扩展的参数,必须大小写一致

3、在业务类调用mapper接口之前开启pagehelper:

精彩文章

评论可见,请评论后查看内容,谢谢!!!
 您阅读本篇文章共花了: