当前使用版本 3.5.6
当前环境信息 * Java 21.0.3 * Mysql 8.4.0 * Spring Boot 3.3.0 (包含 MyBatis 3.5.14)
描述bug现象
项目无法启动,启动时报错。
提供问题复现步骤
下载下方提供的 mybatis-3.zip 即可重现。
提供完整堆栈日志(可选)
***************************
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.parse(MybatisMapperAnnotationBuilder.java:122)
The following method did not exist:
'void org.apache.ibatis.session.Configuration.parsePendingMethods(boolean)'
The calling method's class, com.baomidou.mybatisplus.core.MybatisMapperAnnotationBuilder, was loaded from the following location:
jar:file:/C:/Users/Admin/.m2/repository/com/baomidou/mybatis-plus-core/3.5.6/mybatis-plus-core-3.5.6.jar!/com/baomidou/mybatisplus/core/MybatisMapperAnnotationBuilder.class
The called method's class, org.apache.ibatis.session.Configuration, is available from the following locations:
jar:file:/C:/Users/Admin/.m2/repository/org/mybatis/mybatis/3.5.14/mybatis-3.5.14.jar!/org/apache/ibatis/session/Configuration.class
The called method's class hierarchy was loaded from the following locations:
org.apache.ibatis.session.Configuration: file:/C:/Users/Admin/.m2/repository/org/mybatis/mybatis/3.5.14/mybatis-3.5.14.jar
提供问题复现工程(可选)
Comment From: nieqiurong
你自行指定的就升级mybatis版本,3.5.6依赖的就是3.5.16。 https://repo1.maven.org/maven2/com/baomidou/mybatis-plus/3.5.6/mybatis-plus-3.5.6.pom
Comment From: Demonese
懂了,这样指定一下就没问题了
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.5.16</version>
</dependency>