今天用@Test进行测试时一直报错,JUnit插件一直下载失败,好在最后找到了解决的办法。
一种是手动导入Junit jar包,另一种是在pom.xml文件中添加junit,我使用的是第二种方法
https://github.com/junit-team/junit4/wiki/Download-and-Install
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<scope>test</scope>
</dependency>
希望能帮助遇到同样问题的人。