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

3.4.2

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

use @MybatisTest to test mapper layer but caused a problem

2021-08-31 03:14:55.055] [INFO] [main] - logStartupProfileInfo(SpringApplication.java:675) - No active profile set, falling back to default profiles: default [2021-08-31 03:14:55.055] [ERROR] [main] - reportFailure(SpringApplication.java:858) - Application run failed java.lang.IllegalStateException: Unable to read meta-data for class org.mybatis.spring.boot.autoconfigure.MybatisLanguageDriverAutoConfiguration at org.springframework.boot.autoconfigure.AutoConfigurationSorter$AutoConfigurationClass.getAnnotationMetadata(AutoConfigurationSorter.java:245) ~[spring-boot-autoconfigure-2.1.4.RELEASE.jar:2.1.4.RELEASE] at org.springframework.boot.autoconfigure.AutoConfigurationSorter$AutoConfigurationClass.getOrder(AutoConfigurationSorter.java:214) ~[spring-boot-autoconfigure-2.1.4.RELEASE.jar:2.1.4.RELEASE] at org.springframework.boot.autoconfigure.AutoConfigurationSorter$AutoConfigurationClass.access$000(AutoConfigurationSorter.java:155) ~[spring-boot-autoconfigure-2.1.4.RELEASE.jar:2.1.4.RELEASE] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.lambda$getInPriorityOrder$0(AutoConfigurationSorter.java:62) ~[spring-boot-autoconfigure-2.1.4.RELEASE.jar:2.1.4.RELEASE] at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355) ~[?:1.8.0_191] at java.util.TimSort.sort(TimSort.java:220) ~[?:1.8.0_191] at java.util.Arrays.sort(Arrays.java:1512) ~[?:1.8.0_191] at java.util.ArrayList.sort(ArrayList.java:1462) ~[?:1.8.0_191]

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

add dependencies to you pom.xml and execute test

    <!-- https://mvnrepository.com/artifact/com.h2database/h2 -->
    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
    </dependency><!-- https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter-test -->
    <dependency>
        <groupId>org.mybatis.spring.boot</groupId>
        <artifactId>mybatis-spring-boot-starter-test</artifactId>
        <version>2.2.0</version>
        <scope>test</scope>
    </dependency>

报错信息

Comment From: miemieYaho

MyBatis-Plus how can I use mybatis-spring-boot-test with mybatis-plus