这可能是因为您的项目中缺少 'junit-platform-launcher' 的依赖。您可以尝试在项目的 pom.xml 文件中添加以下依赖:

<dependency>
    <groupId>org.junit.platform</groupId>
    <artifactId>junit-platform-launcher</artifactId>
    <version>1.9.2</version>
    <scope>test</scope>
</dependency>

如果您已经添加了这个依赖,可能是因为 Maven 无法正常访问 Maven Central 存储库。您可以尝试清理 Maven 本地存储库并重新构建项目,或者检查您的网络连接是否正常。

Spring 5 项目引入 JUnit 5.9.2 报错:Failed to resolve org.junit.platform:junit-platform-launcher:1.9.2