Error starting ApplicationContext. To display the conditions report re–run your application with ‘debug‘ enabled.
[threathunting:172.20.1.102:28085] 2022-11-04 15:02:23.912 ERROR 20660 [-] [main] o.s.b.d.LoggingFailureAnalysisReporter***************************
APPLICATION FAILED TO START
***************************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:677)
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:/D:/repository/org/mybatis/mybatis/3.5.3/mybatis-3.5.3.jar!/org/apache/ibatis/annotations/Select.class
The class hierarchy was loaded from the following locations:
org.apache.ibatis.annotations.Select: file:/D:/repository/org/mybatis/mybatis/3.5.3/mybatis-3.5.3.jar
Correct the classpath of your application so that it contains a single, compatible version of org.apache.ibatis.annotations.Select
Disconnected from the target VM, address: ‘127.0.0.1:59677’, transport: ‘socket‘
问题分析,发现引用的是 mybatis 下的 select 包
mvn dependency:tree > a.txt
在 pagehelper 分页插件中引入了 mybatis jar 包
接下来问题就很好解决了,在项目中找到pagehelper 这个依赖,包 mybatis 依赖排除
<!--pagehelper-->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.13</version>
<exclusions>
<exclusion>
<artifactId>mybatis</artifactId>
<groupId>org.mybatis</groupId>
</exclusion>
</exclusions>
</dependency>
原文地址:https://blog.csdn.net/wangguoqing_it/article/details/127689261
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.7code.cn/show_38368.html
如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!