springboot 使用test时 注解@RunWith不存在的解决方法:
将pow文件中的依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
改为:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
版权声明:本文为lmsnice原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。