您现在的位置是: 首页 > 后端开发 springboot引入mybatis-plus后出现ClassNotFoundException: org.mybatis.logging.LoggerFactory

springboot引入mybatis-plus后出现ClassNotFoundException: org.mybatis.logging.LoggerFactory

2020-05-21 后端开发 4172人已围观 6987次浏览

简介springboot引入mybatis-plus后出现ClassNotFoundException: org.mybatis.logging.LoggerFactory

由于之前是使用的 mybatis 和分页 pagehelper ,但是和 mybatis-plus 冲突,只需要注释或删掉这两个包即可

<dependency>
    <groupId>org.mybatis.spring.boot</groupId>
    <artifactId>mybatis-spring-boot-starter</artifactId>
    <version>1.3.1</version>
</dependency>
<dependency>
    <groupId>com.github.pagehelper</groupId>
    <artifactId>pagehelper-spring-boot-starter</artifactId>
    <version>1.2.3</version>
</dependency>

单独使用 mybatis-plus 包即可解决

<!-- MyBatis-Plus -->
<dependency>
    <groupId>com.baomidou</groupId>
    <artifactId>mybatis-plus-boot-starter</artifactId>
    <version>3.3.1.tmp</version>
</dependency>

分页就使用 MyBatis-Plus 自带的分页 IPage 即可

很赞哦! (0)

站长推荐

站点信息

  • 网站地图