在使用mybatisPlus的时候,使用了PageHelper分页,结果报错了
报错
Caused by: java.lang.NoClassDefFoundError: org/mybatis/logging/LoggerFactory
解决方案
1.如果不需要用到pagehelper-spring-boot-starter相关,可以注释掉pagehelper-spring-boot-starter依赖。
2.把pagehelper中的mybatis依赖删除即可。
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.5</version>
<exclusions>
<exclusion>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
</exclusion>
<exclusion>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
</exclusion>
</exclusions>
</dependency>