成功解决:Correct the classpath of your application so that it contains a single, compatible version of 包

成功解决:Correct the classpath of your application so that it contains a single, compatible version of 包IDEA启动项目时报错Correcttheclasspathofyourapplicationsothatitcontainsasingle,compatibleversionofcom.baomidou.mybatisplus.core.MybatisConfiguration报错内容如下:2020-07-2921:31:16.891ERROR12488—[main]o.s.b.d.LoggingFailureAnalysisReporter:APPLIC

IDEA启动项目时报错Correct the classpath of your application so that it contains a single, compatible version of com.baomidou.mybatisplus.core.MybatisConfiguration

报错内容如下:
2020-07-29 21:31:16.891 ERROR 12488 — [main] o.s.b.d.LoggingFailureAnalysisReporter :
APPLICATION FAILED TO START
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
com.baomidou.mybatisplus.core.MybatisMapperAnnotationBuilder.getLanguageDriver(MybatisMapperAnnotationBuilder.java:371)
The following method did not exist: com.baomidou.mybatisplus.core.MybatisConfiguration.getLanguageDriver(Ljava/lang/Class;)Lorg/apache/ibatis/scripting/LanguageDriver;
The method’s class, com.baomidou.mybatisplus.core.MybatisConfiguration, is available from the following locations:
jar:file:/D:/MavenRepository/maven_jar/com/baomidou/mybatis-plus-core/3.3.2/mybatis-plus-core-3.3.2.jar!/com/baomidou/mybatisplus/core/MybatisConfiguration.class
The class hierarchy was loaded from the following locations:
com.baomidou.mybatisplus.core.MybatisConfiguration: file:/D:/MavenRepository/maven_jar/com/baomidou/mybatis-plus-core/3.3.2/mybatis-plus-core-3.3.2.jar**
org.apache.ibatis.session.Configuration: file:/D:/MavenRepository/maven_jar/org/mybatis/mybatis/3.4.6/mybatis-3.4.6.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of com.baomidou.mybatisplus.core.MybatisConfiguration
Process finished with exit code 1
报错截图如下:
在这里插入图片描述
意思就是pom.xml里面的依赖包有重复,需要将重复的依赖包删除
我这里是mybatis-plus-core-3.3.2.jarmybatis-3.4.6.jar重复了,
那么我们来到pom.xml中
用快捷键ctrl+f打开搜索栏,输入mybatis,如图所示
成功解决:Correct the classpath of your application so that it contains a single, compatible version of 包

把其中一个依赖包的删除就行,我这里把mybatis-plus-boot-starter依赖包删除

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

成功解决:Correct the classpath of your application so that it contains a single, compatible version of 包

输入完毕后,更新依赖
在这里插入图片描述
重新启动项目
成功解决:Correct the classpath of your application so that it contains a single, compatible version of 包

希望能解决同样的问题,欢迎讨论。

今天的文章成功解决:Correct the classpath of your application so that it contains a single, compatible version of 包分享到此就结束了,感谢您的阅读。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/9865.html

(0)
编程小号编程小号

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注