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>
相关推荐
七夜zippoe1 天前
API设计规范:RESTful API设计与OpenAPI(Swagger)完整指南
后端·restful·设计规范
2601_949817721 天前
Spring+SpringMVC项目中的容器初始化过程
java·后端·spring
青柠代码录1 天前
【SpringBoot】集成 Knife4j
后端
杰克尼1 天前
SpringCloud_day04
后端·spring·spring cloud
小信丶1 天前
Spring MVC @SessionAttributes 注解详解:用法、场景与实战示例
java·spring boot·后端·spring·mvc
爱丽_1 天前
Redis 持久化与高可用:RDB/AOF、主从复制、哨兵与一致性取舍
java·后端·spring
盐水冰1 天前
【烘焙坊项目】补充完善(1)- SpringAI大模型接入
java·后端·大模型
yuanlaile1 天前
Go语言(Golang)2026年3月整理经典面试常见问题面试题汇总,建议收藏
后端·golang·go语言面试题·golang后端开发·2026golang面试
斌糖雪梨1 天前
spring registerBeanPostProcessors(beanFactory) 源码详解
java·后端·spring
wqww_11 天前
springboot 使用websocket来记录移动人物坐标
spring boot·后端·websocket