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

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$AnnotationWrapper.<init>(MybatisMapperAnnotationBuilder.java:686)

The following method did not exist:

org.apache.ibatis.annotations.Select.databaseId()Ljava/lang/String;

The method’s class, org.apache.ibatis.annotations.Select, is available from the following locations:

jar:file:/F:/BaiduNetdiskDownload/respository_new/org/mybatis/mybatis/3.5.1/mybatis-3.5.1.jar!/org/apache/ibatis/annotations/Select.class

The class hierarchy was loaded from the following locations:

org.apache.ibatis.annotations.Select: file:/F:/BaiduNetdiskDownload/respository_new/org/mybatis/mybatis/3.5.1/mybatis-3.5.1.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of org.apache.ibatis.annotations.Select

好像是一个依赖冲突的问题,真尼玛烦人

在这里插入图片描述

尝试方法:

在heima-leadnews-model的pom文件中注释mybatis的依赖或在mybatis-plus-boot-starter中去除mybatis依赖
在这里插入图片描述
问题:直接注释mybatis依赖会产生找不到mybatis包的情况,采用exclusions的方法不知道是否层级太多,无法去除

在这里插入图片描述

最终方法:升级mybatis的版本

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值