项目中途引入Mybatis-plus后报错,报错Caused by: java.lang.ClassNotFoundException: org.mybatis.logging.LoggerFacto

2022/2/14 22:42:46

本文主要是介绍项目中途引入Mybatis-plus后报错,报错Caused by: java.lang.ClassNotFoundException: org.mybatis.logging.LoggerFacto,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

一、报错原因

mybatis-plus和pagehelper jar包冲突,注释mybatis-spring和pagehelper插件即可

<!-- SpringBoot集成mybatis框架 -->
<!--<dependency>-->
    <!--<groupId>org.mybatis.spring.boot</groupId>-->
    <!--<artifactId>mybatis-spring-boot-starter</artifactId>-->
    <!--<version>${mybatis.spring.boot.starter.version}</version>-->
<!--</dependency>-->

<dependency>
    <groupId>com.baomidou</groupId>
    <artifactId>mybatis-plus-boot-starter</artifactId>
    <version>3.2.0</version>
</dependency>

<!-- pagehelper 分页插件 -->
<!--<dependency>-->
    <!--<groupId>com.github.pagehelper</groupId>-->
    <!--<artifactId>pagehelper-spring-boot-starter</artifactId>-->
    <!--<version>${pagehelper.spring.boot.starter.version}</version>-->
<!--</dependency>-->

 

如果还想用这俩插件,升级这俩插件版本

<dependency>
    <groupId>org.mybatis.spring.boot</groupId>
    <artifactId>mybatis-spring-boot-starter</artifactId>
    <version>2.1.1</version>
</dependency>

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


<dependency>
    <groupId>com.baomidou</groupId>
    <artifactId>mybatis-plus-boot-starter</artifactId>
    <version>3.3.2</version>
</dependency>

 



这篇关于项目中途引入Mybatis-plus后报错,报错Caused by: java.lang.ClassNotFoundException: org.mybatis.logging.LoggerFacto的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程