在springboot项目中,运行test测试时,弹出提示框
![](https://img-blog.csdnimg.cn/img_convert/3ed48f490149661ee3207aed06aceb75.jpeg)
可是我的maven自定义仓库中已经有了对应的依赖了,它却还是将junit相关依赖下载到了C盘
检查IDEA的仓库配置以及maven的setting文件中,仓库配置都没问题
而后我任由依赖下载到C盘,报错:
Error running xxxTest.contextLoads: Failed to resolve org.junit.platform:xxxx
最后找到解决方案:
在pom.xml中添加如下代码:
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>