今天在用idea测试时,发现报了一个错误:Error running ‘Springboot04DataApplicationTests.contextLoads’: Failed to resolve org.junit.platform:junit-platform-launcher:1.8.2如图所示这是因为pom里面需要添加一个依赖,复制下面的代码,粘贴到pom里即可

dependency>
            <!-- this is needed or IntelliJ gives junit.jar or junit-platform-launcher:1.3.2 not found errors -->
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <scope>test</scope>
        </dependency>
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐