实际开发过程中,运行单测报
在使用SpringBoot测试时如果出现Failed to resolve org.junit.platform:junit-platform-launcher:1.x.x这样的问题,最主要的问题是IntelliJ IDEA版本和junit版本不适配问题,所以
方案一:将IntelliJ IDEA的版本升级到2020以上的版本
方案二:直接在项目的pom.xml文件中添加如下依赖
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
reload project即可解决