Correct the classpath of your application so that it contains a single, compatible version of org.ap

***************************
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.getLanguageDriver(MybatisMapperAnnotationBuilder.java:386)

The following method did not exist:

    org.apache.ibatis.session.Configuration.getLanguageDriver(Ljava/lang/Class;)Lorg/apache/ibatis/scripting/LanguageDriver;

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

    jar:file:/C:/Users/Gavin/.m2/repository/org/mybatis/mybatis/3.5.0/mybatis-3.5.0.jar!/org/apache/ibatis/session/Configuration.class

The class hierarchy was loaded from the following locations:

    org.apache.ibatis.session.Configuration: file:/C:/Users/Gavin/.m2/repository/org/mybatis/mybatis/3.5.0/mybatis-3.5.0.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of org.apache.ibatis.session.Configuration


Process finished with exit code 0

报错原因:Maven引入冲突导致(项目中引入Activiti和Mybatis-plus,两个包都包含mybatis)

解决方案:排除其中一个包中mybatis

 

 <!-- Activiti工作流程引擎 -->
        <dependency>
            <groupId>org.activiti</groupId>
            <artifactId>activiti-spring-boot-starter</artifactId>
            <version>${activiti.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.mybatis</groupId>
                    <artifactId>mybatis</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

 

上一篇:高可用系列之Nginx


下一篇:[UnexpectedValueException] Your github oauth token for github.com contains invalid characters