栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

mybatisplus:An attempt was made to call a method that does not exist

mybatisplus:An attempt was made to call a method that does not exist

异常名称
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.getLanguageDriver(MybatisMapperAnnotationBuilder.java:371)

The following method did not exist:

    com.baomidou.mybatisplus.core.MybatisConfiguration.getLanguageDriver(Ljava/lang/Class;)Lorg/apache/ibatis/scripting/LanguageDriver;

The method's class, com.baomidou.mybatisplus.core.MybatisConfiguration, is available from the following locations:

    jar:file:/C:/maven/repository/com/baomidou/mybatis-plus-core/3.3.2/mybatis-plus-core-3.3.2.jar!/com/baomidou/mybatisplus/core/MybatisConfiguration.class

It was loaded from the following location:

    file:/C:/maven/repository/com/baomidou/mybatis-plus-core/3.3.2/mybatis-plus-core-3.3.2.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of com.baomidou.mybatisplus.core.MybatisConfiguration
原因分析

mybatisplus 包依赖冲突导致,大家可以展开mybatis的包依赖,可以看到mybatis依赖显示冲突,mybatisplus依赖的是3.5.2,但是被一个3.4.2的版本冲突了(idea编辑器界面如下)

进行依赖分析找到产生此依赖的包,使用idea分析如下 mybatis----》activiti-engine----》activiti-spring-boot-starter(项目中引入的)

最终可以确定是由于我在项目中引入了activiti-spring-boot-starter,activiti-spring-boot-starter中引入了mybatis3.4.2,导致产生mybatis依赖包冲突,mybatis-plus使用了低版本的mybatis,导致method that does not exist。
解决办法:排除activiti-spring-boot-starter中的mybatis,使用mybatisplus中高版本的mybatis,重新编译工程(一般使用高版本的mybatis,除非版本不兼容,再想办法)。


    org.activiti
    activiti-spring-boot-starter
    7.1.0.M4
    
        
            org.mybatis
            mybatis
        
    

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/681328.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号