使用SpringBoot搭建微服务的时候,想测试一下,结果发现@RunWith注解报错,一番折腾后,发现,竟然是因为。。。。。。。。。
没有导入依赖

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>

导入以上依赖就可以使用啦!!!
使用SpringBoot搭建微服务的时候,想测试一下,结果发现@RunWith注解报错,一番折腾后,发现,竟然是因为。。。。。。。。。
没有导入依赖
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
导入以上依赖就可以使用啦!!!
本文标题:@RunWith注解无法使用的原因终于找到了
本文链接:https://www.haomeiwen.com/subject/ftnfvrtx.html
网友评论