首页 > 其他分享 >Correct the classpath of your application so that it contains a single, compatible version of xxx报错解

Correct the classpath of your application so that it contains a single, compatible version of xxx报错解

时间:2023-04-26 14:33:16浏览次数:46  
标签:xxx extension contains baomidou plus 3.1 mybatis 报错 com

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提供的工具查看依赖

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

 

完美

标签:xxx,extension,contains,baomidou,plus,3.1,mybatis,报错,com
From: https://www.cnblogs.com/newAndHui/p/17355965.html

相关文章

  • 解决Python中报错RequestsDependencyWarning: urllib3 (1.26.9) or chardet (5.1.0)/c
      在运行requests包时,出现了以下报错信息:RequestsDependencyWarning:urllib3(1.26.9)orchardet(5.1.0)/charset_normalizer(2.0.12)doesn'tmatchasupportedversion!warnings.warn("urllib3({})orchardet({})/charset_normalizer({})doesn'tmatchasu......
  • python安装pillow报错
    Fatalerrorinlauncher:Unabletocreateprocessusing'"D:\ProgramFiles\Python311\python.exe" "D:\ProgramFiles\Python311\Scripts\pip.exe"installpillow':??????????? 解决:cmd窗口执行32位:python3-mpipinstall--up......
  • 解决 NET6 GET请求不设置参数值报错问题
    1、调用的方法1///<summary>2///获取干预集合3///</summary>4///<returns></returns>5[HttpGet]6publicJsonResultGetIntervenes(stringkeyword)7{89Li......
  • node-sass报错?三步解决!!!
    1,报错内容2.解决方案一、本地安装的node和node-sass不匹配//查看node版本node-v二、下载源在国外,更换中国镜像源//更换淘宝镜像源npmconfigsetregistryhttp://registry.npmmirror.com三、单独安装node-sass//按照需要的node-sass版本进行安装,此处是node的版本......
  • spring 依赖注入用@Autowired报错 No unique bean of type
    1,报错如下Causedby:org.springframework.beans.factory.NoSuchBeanDefinitionException:Nouniquebeanoftype[org.springframework.amqp.rabbit.core.RabbitTemplate]isdefined:expectedsinglematchingbeanbutfound4:[jmsTemplate1,jmsTemplate2,jmsTemplate3......
  • 虚拟机|--Hyper-V|--Start PXE over IPv4.报错解决方案
    前言在Hyper-V管理器中>>操作>>"快速创建"了一个WIndowsXP系统的虚拟机,结果启动的时候报错了解决方案在创建虚拟机的时候不要快速创建,而使用新建,在指定代数步骤选择第一代(1),开始创建的步骤改一下就可以了.其他配置推荐在分配内存步骤我写的是8000M左右,(根......
  • 【Azure 应用服务】启用 Managed Identity 登录 SQL Server 报错 Managed Identity au
    问题描述在AppService中启用Identity后,使用系统自动生成Identity。使用如下代码连接数据库SQLServer:SQLServerDataSourcedataSource=newSQLServerDataSource();dataSource.setServerName("yoursqlservername.database.chinacloudapi.cn");//Replacewit......
  • python 连接oracle 报错 cx_Oracle.DatabaseErro
    1,python连接oracle的时候报错如下cx_Oracle.DatabaseError:ORA-24315:非法的属性类型,2,导致这个错误的原因是服务器oracle版本和客户端cx_oracle客户端版本不一致引起的,所以通过下面命令询oracle版本。select*fromv$version3,然后到http://sourceforge.net/projects/cx-ora......
  • tomcat报错 removeGeneratedClassFiles failed
    1,tomcat切换用户重启后报错如下:Aug29,20142:14:47PMorg.apache.jasper.compiler.CompilerremoveGeneratedClassFilesWARNING:Failedtodeletegeneratedclassfile[/home/joeyon/test/work/Catalina/localhost/_/org/apache/jsp/WEB_INFO/c/common/errorIos_jsp.class]......
  • nginx报错
    nginx重启失败:nginx:[crit]pread()"/var/run/nginx/nginx.pid"failed(21:Isadirectory)解决方案:查看进程ps-ef|grepnginx强行杀死主进程kill7688启动nginx../sbin/nginx此时停止或者刷新nginx都可以../sbin/nginx-sstop../sbin/nginx-srel......