pom.xml增加Mybatisplus的依赖后报错:Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: org/mybatis/logging/LoggerFactory

发布时间 2023-07-11 16:33:38作者: jiduoduo

出现上面的问题,是版本不匹配导致。

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

之前用的是1.2.0的版本,改成2.2.0的,再次启动error消失。