PageHelper不起作用的最后办法

如果你确定PageHelper的使用没有错误,哪哪都检查了没有发现问题,但插件就是不起作用,
一头雾水之时,请回头看看是不是依赖引错了。

Maven项目:

<dependency>
    <groupId>com.github.pagehelper</groupId>
    <artifactId>pagehelper</artifactId>
    <version>最新版本</version>
</dependency>

可参考: Mybatis-PageHelper

Spring Boot 项目:

<dependency>
    <groupId>com.github.pagehelper</groupId>
    <artifactId>pagehelper-spring-boot-starter</artifactId>
    <version>最新版本</version>
</dependency>

可参考: pagehelper-spring-boot-starter

注意在Spring Boot的项目一定要引用后者,否则,PageHelper和Spring Boot的版本问题很可能就成了导致插件不起作用的罪魁祸首。

发布了13 篇原创文章 · 获赞 7 · 访问量 530

猜你喜欢

转载自blog.csdn.net/nibonnn/article/details/104376029
今日推荐