SpringBoot 使用分页插件 PageHelper 分页无效

骑猪看日落 2023-03-05 13:29 272阅读 0赞

SpringBoot 使用分页插件 PageHelper 分页无效


最近使用github上开源的 pagehelper 的分页插件无效,找了网上的解决方便,做个记录


  • 分页无效代码:
    在这里插入图片描述

问题原因:

由于 SpringBoot 的版本变换,所以导致很多 maven 依赖也需要更新


解决方法:

现在都用 spring-boot 2.x.x 版本了,所以需要更换老版本的 maven 依赖,只需要将下面的 maven 依赖换成对应 springboot 版本的依赖即可即可

  • spring-boot 1.x.x 的版本:


    com.github.pagehelper
    pagehelper
    4.1.3
  • spring-boot 2.x.x 的版本:


    com.github.pagehelper
    pagehelper-spring-boot-starter
    1.2.5

发表评论

表情:
评论列表 (有 0 条评论,272人围观)

还没有评论,来说两句吧...

相关阅读