springboot整合junit无法使用@RunWith注解?
springboot吧
全部回复
仅看楼主
level 2
U3D超会玩🐶
楼主
junit4.10中有@Runwith注解,但使用elasticsearch需要4.12以上,spring-boot-start-test中junit为4.12,但提示没有这个注解??
2018年07月27日 12点07分
1
level 3
Justever浅唱
在springboot项目中中 src/test/main 先使用
2018年08月07日 08点08分
2
lihaihuai3yy
这个好使
2020年08月11日 11点08分
level 3
Justever浅唱
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>4.2.4.RELEASE</version><!--$NO-MVN-MAN-VER$-->
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
pom坐标
2018年08月07日 08点08分
3
U3D超会玩🐶
已经解决啦,可能由于我的网络问题,从阿里远程下载到maven仓库的包出了问题,把本地仓库中这个包删了重下,就好了
2018年08月08日 10点08分
Justever浅唱
回复 U3D超会玩🐶 :嗯嗯
2018年08月08日 11点08分
1