[Solved] Failed to resolve org.junit.platform:junit-platform-launcher:1.7.2

For springboot project, when using applicationtests to test, the following error will be prompted:

11:47 am  Error running ‘ShiroDemoApplicationTests.contextLoads’: Failed to resolve org.junit. platform:junit-platform-launcher :1.7.2

Reason: IntelliJ idea version and JUnit version do not match


1. Add the following dependencies to the pom.xml file of the project:


2. It is more troublesome to adjust the two versions to match. The first method is recommended.

Read More: