springboot项目不能同时跑junit4和junit5的解决方法
springboot项目的maven test只会跑junit4 @RunWith注解的测试类,而不会跑junit5 @ExtendWith的测试类
解决方法:pom加上以下plugin,版本号需要3.0.0-M5及以上
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>3.0.0-M5</version>
</plugin>
参考:java - Run Both JUnit 4 and Junit5 With Maven Surefire Plugin - 2020 - Stack Overflow