1.使用springboot 2.7.14的版本,
测试类用@Test注解
出现 Exception in thread “main” java.lang.NoClassDefFoundError: org/junit/platform/launcher/TestIdentifier
Junit5 缺少 junit-platform-launcher依赖, 直接添加即可
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>