pagehelper的失效问题

pagehelper是常用的分页插件,代码中常用到,使用简便且对代码侵入性较小,很多人都喜欢使用。不过有时会遇到分页失败问题,输出结果没有分页,日志输出sql语句没有分页关键字及分页参数,目测是pagehelper插件直接未起作用。此类情况总结起来一般是一下几种问题引起:

  • springboot项目中应导入的包pagehelper与springboot的整合包:
复制代码
        <dependency>
            <groupId>com.github.pagehelper</groupId>
            <artifactId>pagehelper-spring-boot-starter</artifactId>
        </dependency>

直接用pagehelper的包可能无效:

复制代码
        <dependency>
            <groupId>com.github.pagehelper</groupId>
            <artifactId>pagehelper</artifactId>
        </dependency>
相关推荐
Mr_hou几秒前
左手.NET右手Node:一个后端开发的双修之路
后端
wno70411 分钟前
Spring Boot配合Hibernate Validator参数校验
spring boot·后端·hibernate
astronautyi33 分钟前
Go 运行时内存分配与 GC 位图深度剖析
开发语言·后端·golang
techdashen40 分钟前
Go 中如何处理错误
开发语言·后端·golang
GoGeekBaird1 小时前
Agent 时代,你的生产环境,真的敢让它裸奔吗
后端·agent
IT_陈寒1 小时前
Redis Pipeline用错竟比不用还慢,这个坑我帮你踩过了
前端·人工智能·后端
名字还没想好☜2 小时前
Go 1.21 context.WithoutCancel 实战:父 context 取消了,收尾任务还要继续跑
开发语言·后端·golang·go
源代码•宸2 小时前
前置准备:定时微服务有什么价值
经验分享·后端·微服务·云原生·架构
catino2 小时前
高并发详解
后端
掘金者阿豪2 小时前
GPT-6 Astra 来了,GPT-5.6 Sol 还值得用吗?聊聊 Coding、百万上下文、价格和 Plus/Pro
前端·后端