SpringBoot+Mybatis Plus导致PageHelper失效的解决方法
作者:杨吉吉呜哇哇
在Springboot项目中使用分页插件的时候,发现PageHelper插件失效了 ,本文主要介绍了SpringBoot+Mybatis Plus导致PageHelper失效的解决方法,感兴趣的可以了解一下
解决方法
再PageHelper依赖中,排除Mybatis,因为MybatisPlus整合了Mybatis,而不排除PageHelper中的Mybatis可能导致版本冲突问题
父pom项目中的依赖版本管理
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.4.7</version>
</dependency>子pom项目中的依赖管理
<!-- pagehelper-->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
</exclusion>
</exclusions>
</dependency>到此这篇关于SpringBoot+Mybatis Plus导致PageHelper失效的解决方法的文章就介绍到这了,更多相关SpringBoot 导致PageHelper失效内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!
