当前使用版本(必须填写清楚,否则不予处理)

3.1.1 springboot 版本 2.1.3.RELEASE

该问题是怎么引起的?(最新版上已修复的会直接close掉)

从3.1.0升级到3.1.1启动报错,原因未知

重现步骤

3.1.0启动正常,使用正常,升级到3.1.1之后启动失败,降级回到3.1.0则启动成功

报错信息


APPLICATION FAILED TO START


Description:

An attempt was made to call the method com.baomidou.mybatisplus.core.MybatisConfiguration.getLanguageDriver(Ljava/lang/Class;)Lorg/apache/ibatis/scripting/LanguageDriver; but it does not exist. Its class, com.baomidou.mybatisplus.core.MybatisConfiguration, is available from the following locations:

jar:file:/D:/tools/maven/repository/com/baomidou/mybatis-plus-core/3.1.1/mybatis-plus-core-3.1.1.jar!/com/baomidou/mybatisplus/core/MybatisConfiguration.class

It was loaded from the following location:

file:/D:/tools/maven/repository/com/baomidou/mybatis-plus-core/3.1.1/mybatis-plus-core-3.1.1.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of com.baomidou.mybatisplus.core.MybatisConfiguration

Comment From: miemieYaho

把你如何使用的描述清楚

Comment From: sks-lwei

发现问题了。是因为MyBatis版本冲突,3.1.1将MyBatis版本升级到了3.5.1,但是在自定义mapper中使用@Param(Constants.WRAPPER)的时候,注解导入的包是MyBatis原生注解,导致编译器自动导入两个版本的MyBatis。将旧版本的MyBatis删除,并在@Param注解处重新导入最新版本的MyBatis,问题解决

Comment From: smfx1314

我在配置pagehelp时出现这个问题,求解决

Comment From: Lyanf

遇到了同样的问题,把mybatis的starter删掉,只留plus的就好了,应该是plus内置了mybatis,导致了两个冲突

Comment From: mustang-x

我在配置pagehelp时出现这个问题,求解决

pageHelper里面有个mybatis的版本,exclusion掉换成3.51的

Comment From: i36lib

只引入了mybatis-plus-boot-starter 3.1.2版本,也报这个错,引入对应版本的mybatis 3.5.1 版本即可解决

<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.5.1</version> </dependency>