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>

猜你喜欢

转载自www.cnblogs.com/ez4zzw/p/12602494.html
今日推荐