当前使用版本(必须填写清楚,否则不予处理)
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.1.0</version>
</dependency>
该问题是怎么引起的?(最新版上已修复的会直接close掉)
无法方便的进行最小规模的集成测试
重现步骤
利用mybatis-spring-boot-test-autoconfigure 进行mapper的单元测试,缺乏支持,直接报错. 因为MPG进行了configruation 和 sqlsessionfactory的替换. http://www.mybatis.org/spring-boot-starter/mybatis-spring-boot-test-autoconfigure/
报错信息
Caused by: java.io.FileNotFoundException: class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180)
at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:51)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103)
at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.createMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:88)
at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:75)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:81)
at org.springframework.boot.autoconfigure.AutoConfigurationSorter$AutoConfigurationClass.getAnnotationMetadata(AutoConfigurationSorter.java:241)
... 51 more
Comment From: miemieYaho
自己想办法
Comment From: 6westboy9
态度真差