<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>
加上这个可以解决,在另一个帖子看到的
https://blog.csdn.net/qiuyeyijian/article/details/104401631