Sprin Boot无RunWith注解解决办法

在使用RunWith注解时提示错误,原因是没有导入junit的依赖

<dependency>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
     <version>4.12</version>
     <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.junit.jupiter</groupId>
    <artifactId>junit-jupiter-api</artifactId>
    <version>5.0.0</version>
</dependency>
posted @ 2020-03-31 00:35  EZ4ZZW  阅读(1232)  评论(0编辑  收藏  举报