Correct the classpath of your application so that it contains a single, compatible version of xxx报错解决
1.背景
有时候引入包有冲突,比如在Maven项目中的不同模块多次重复引入等
这里遇到的问题是重复映入了如下包:
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.0-RELEASE</version>
</dependency>
导致启动报错如下:
.....
.....
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-04-26 14:08:36.800 | | main | ERROR | o.s.b.diagnostics.LoggingFailureAnalysisReporter:40 - ***************************
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.autoconfigure.MybatisPlusAutoConfiguration.applyConfiguration(MybatisPlusAutoConfiguration.java:190) The following method did not exist: com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean.setConfiguration(Lorg/apache/ibatis/session/Configuration;)V The method's class, com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean, is available from the following locations: jar:file:/D:/repository/com/baomidou/mybatis-plus-extension/3.1.0/mybatis-plus-extension-3.1.0.jar!/com/baomidou/mybatisplus/extension/spring/MybatisSqlSessionFactoryBean.class It was loaded from the following location: file:/D:/repository/com/baomidou/mybatis-plus-extension/3.1.0/mybatis-plus-extension-3.1.0.jar
2.问题排查步骤
步骤一:利用idea提供的工具查看依赖

步骤二:点击进去,找到最左左边红色的箭头,然后点击进去,找到那个引用,删除尝试即可

完美
Correct the classpath of your application so that it contains a single, compatible version of xxx报错解决的更多相关文章
- 整合zuul启动时报错Correct the classpath of your application so that it contains a single, compatible version of XXX
今天集成zuul与consul的时候,出现如下错误 ***************************APPLICATION FAILED TO START******************** ...
- 整合shiro出现【Correct the classpath of your application so that it contains a single, compatible version of org.quartz.Scheduler】
跑的时候出现错误: Description: An attempt was made to call the method org.quartz.Scheduler.getListenerManage ...
- Correct the classpath of your application so that it contains a single, compatible version of org.thymeleaf.spring5.SpringTemplateEngine
Error starting ApplicationContext. To display the conditions report re-run your application with 'de ...
- Correct the classpath of your application so that it contains a single, compatible version of org.springframework.util.Assert
一.问题描述 今天启动springboot工程时,报上面的错误. 二.解决方法 加入如下pom: <dependency> <groupId>org.springframewo ...
- Error configuring application listener of class 报错 解决
Error configuring application listener of class 次错误是由于工程没有贬义Class文件造成的,clean一下编译一下工程,clean之后进入项目目录查看 ...
- pip报错:解决pkg_resources.DistributionNotFound: The 'pip==7.1.0' distribution was not found and is required by the application
如果pip安装后提示依然没有pip命令,需在在添加环境变量 # vim /etc/profile 在文档最后,添加: export PATH="/usr/local/python2.7/bi ...
- 【Devops】【docker】【CI/CD】Jenkins源码管理,设置gitlab上项目的clone地址 + jenkins构建报错:Please make sure you have the correct access rights and the repository exists.
注意,如果 jenkins构建报错:Please make sure you have the correct access rights and the repository exists. 而此时 ...
- 报错:The specified datastore driver ("com.mysql.jdbc.Driver") was not found in the CLASSPATH. Please check your CLASSPATH specification, and the name of the driver.
报错背景: CDH中集成hive插件,启动报错. 报错现象: [main]: Metastore Thrift Server threw an exception... javax.jdo.JDOFa ...
- Webservice报错客户端发现响应内容类型为“application/json;charset=UTF-8”,但应为“text/xml”。
控制台对接Webservice正常,同样的方法在Web项目上报错: 客户端发现响应内容类型为“application/json;charset=UTF-8”,但应为“text/xml”.请求失败,错误 ...
- iOS---用Application Loader 上传的时候报错No suitable application records were found. Verify your bundle identifier 'xx' is correct
用Application Loader 上传的时候报错,突然发现用Application Loader的账号 竟然不是公司的账号 换成公司的账号 就可以了.
随机推荐
- window.onload()函数和jQuery中的document.ready()有什么区别?
a.执行时间:window.onload必须等到页面内包括图片的所有元素加载完毕后才能执行.$(document).ready()是DOM结构绘制 完毕后就执行,不必等到加载完毕.$(doc ...
- Apollo quick start SampleApp demo Java
<!--配置中心--> <dependency> <groupId>com.ctrip.framework.apollo</groupId> <a ...
- Lecture3
Smiling & Weeping ---- 蝴蝶在双翼里藏匿夏的脉络 妄图在绿意中品鉴隆冬 第三章 Git分支管理 3.1 分支的简介 Git最重要的运用场景是多人协同开发,但是如何能保证每 ...
- 苹果应用商店上传应用卡在了“Authenticating with the iTunes Store”
在终端中依次运行下面代码 cd ~ mv .itmstransporter/ .old_itmstransporter/ "/Applications/Xcode.app/Contents/ ...
- 更难、更好、更快、更强:LLM Leaderboard v2 现已发布
摘要 评估和比较大语言模型 (LLMs) 是一项艰巨的任务.我们 RLHF 团队在一年前就意识到了这一点,当时他们试图复现和比较多个已发布模型的结果.这几乎是不可能完成的任务:论文或营销发布中的得分缺 ...
- 粗枝大叶记录一下java9模块化改造一个项目的过程(Jigsaw)
假设项目结构如下: 其中的依赖关系为 我实际用的jdk是17 1. common模块创建描述文件,在common的src/main/java下创建module-info.java, 内容默认 /** ...
- python rsa加密
rsa简单加密: 1 import rsa 2 import base64 3 4 rsa_key_pair = rsa.newkeys(2048) # 生成密钥对,返回(PublicKey(n,e) ...
- Java int/int 保留2位小数
@Test public void txfloat() { // TODO 自动生成的方法存根 int a=9; int b=7; DecimalFormat df=new DecimalFormat ...
- 详解Web应用安全系列(10)文件上传漏洞
文件上传漏洞(File Upload Vulnerabilities)是Web攻击中常见的一种安全漏洞,它允许攻击者上传并执行恶意文件,从而可能对Web服务器造成严重的安全威胁. 一.定义与原理 文件 ...
- 重磅来袭!MoneyPrinterPlus一键发布短视频到视频号,抖音,快手,小红书上线了
MoneyPrinterPlus开源有一段时间了,已经实现了批量短视频混剪,一键生成短视频等功能. 有些小伙伴说了,我批量生成的短视频能不能一键上传到视频号,抖音,快手,小红书这些视频平台呢?答案是必 ...