baomidou / mybatis-plus

An powerful enhanced toolkit of MyBatis for simplify development
https://baomidou.com
Apache License 2.0
16.44k stars 4.31k forks source link

3.5.3.2 mybatis-plus-boot-starter springboot 启动失败 #5577

Closed D-Li-Ang closed 1 year ago

D-Li-Ang commented 1 year ago

当前使用版本(必填,否则不予处理)

3.5.3.2

该问题是如何引起的?(确定最新版也有问题再提!!!)

<dependency>
 <groupId>com.baomidou</groupId>
 <artifactId>mybatis-plus-boot-starter</artifactId>
 <version>${mybatis-plus.version}</version>
</dependency> 切换3.5.3.2 后 启动报错

重现步骤(如果有就写完整)

报错信息

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    com.baomidou.mybatisplus.core.MybatisXMLScriptBuilder$ForEachHandler.handleNode(MybatisXMLScriptBuilder.java:230)

The following method did not exist:

    org.apache.ibatis.scripting.xmltags.ForEachSqlNode.<init>(Lorg/apache/ibatis/session/Configuration;Lorg/apache/ibatis/scripting/xmltags/SqlNode;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

The method's class, org.apache.ibatis.scripting.xmltags.ForEachSqlNode, is available from the following locations:

    jar:file:/C:/Users/Administrator/.m2/repository/org/mybatis/mybatis/3.5.6/mybatis-3.5.6.jar!/org/apache/ibatis/scripting/xmltags/ForEachSqlNode.class

后续

<dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <version>${mybatis-plus.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.mybatis</groupId>
                    <artifactId>mybatyis</artifactId>
                </exclusion>
            </exclusions>
 </dependency>

 <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis</artifactId>
            <version>3.5.13</version>
  </dependency>

手动替换mybatis 3.5.13 后启动成功

nieqiurong commented 1 year ago

3.5.3.2携带的是mybatis3.5.13,看你项目是不是哪里有什么问题.

image