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>
相关推荐
不能放弃治疗5 分钟前
上下文压缩机制
后端
QQ_21696290968 分钟前
【项目编号:project95315】SpringBoot公共自习室管理系统:座位预约、房间管理、签到核销、公告规则完整实战
java·spring boot·后端
凤山老林13 分钟前
高可用服务容错架构:Spring Boot 集成 Resilience4j 实战指南
spring boot·后端·架构·resilience4j
手握风云-29 分钟前
Spring Cloud:分布式系统的“粘合剂”(五)
后端·spring·spring cloud
早点睡97531 分钟前
Python 上下文管理器深度剖析:从 with 语法糖到 CPython 底层协议
后端·面试
Cache技术分享33 分钟前
503. Java 反射 - 编写 ServiceFactory 类
前端·后端
高频因子挖掘机34 分钟前
QuantDash 成交量单位统一实战:从“手”到“股”的跨市场量化数据清洗全流程
后端·算法·github
码农看码43 分钟前
Spring Boot 启动到响应:一个 HTTP 请求是怎么走到 Controller 的?
后端
薛定谔的算法1 小时前
NestJS:让 Node.js 后端告别「野路子」
后端·node.js·nestjs
fightcrap1 小时前
DeepSeek Harness:Cordis 插件树与 Agent 主链路
人工智能·后端·程序员