首页 > 其他分享 >IDEA报错: An attempt was made to call a method that does not exist. The attempt was made from the foll

IDEA报错: An attempt was made to call a method that does not exist. The attempt was made from the foll

时间:2022-09-23 11:34:55浏览次数:58  
标签:made attempt jar following mybatis was

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.MybatisXMLConfigBuilder.settingsElement(MybatisXMLConfigBuilder.java:272)

The following method did not exist:

    org.apache.ibatis.session.Configuration.setArgNameBasedConstructorAutoMapping(Z)V

The method's class, org.apache.ibatis.session.Configuration, is available from the following locations:

    jar:file:/E:/mvn/repository/org/mybatis/mybatis/3.5.6/mybatis-3.5.6.jar!/org/apache/ibatis/session/Configuration.class

It was loaded from the following location:

    file:/E:/mvn/repository/org/mybatis/mybatis/3.5.6/mybatis-3.5.6.jar

首先使用Dependency Analyzer查看下是否有冲突冲突jar包
exclude掉冲突的jar包重新引入正确版本

<dependency>
            <groupId>com.hundsun.fais</groupId>
            <artifactId>irm-datamaint-api</artifactId>
            <version>${irm.datamaint.api}</version>
        </dependency>

变为

<dependency>
            <groupId>com.hundsun.fais</groupId>
            <artifactId>irm-datamaint-api</artifactId>
            <version>${irm.datamaint.api}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.baomidou</groupId>
                    <artifactId>mybatis-plus-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-core</artifactId>
            <version>3.5.2</version>
            <scope>compile</scope>
        </dependency>

标签:made,attempt,jar,following,mybatis,was
From: https://www.cnblogs.com/Liuyunsan/p/16722075.html

相关文章