Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/baomidou/

Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/baomidou/mybatisplus/annotation/SqlParser
记录一下这个问题,它前面一直报 create bean error 我还以为是没有加扫描找不到mapper文件,后面排查才发现
这个包

        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-annotation</artifactId>
            <version>3.5.2</version>
        </dependency>

和这个包冲突了

       <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <version>3.4.2</version>
        </dependency>

你可能感兴趣的:(java,mybatis,spring)