Class<SpringJUnit4ClassRunner> cannot be resolved to a type

it2022-05-09  22

练习搭建maven web项目,用尝试用junit测试时一直报Class<SpringJUnit4ClassRunner> cannot be resolved to a type错,第一次报的原因是pom.xml中没有填加

<dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>4.2.4.RELEASE</version> <scope>provided</scope> </dependency>

依赖,第二次报是由于版本号中间多了空格,第三次报是因为需要手动输入下方红框中的包,eclipse不会自动导入。

 

转载于:https://www.cnblogs.com/xiaopu123/p/7396103.html


最新回复(0)