Class<SpringJUnit4ClassRunner> cannot be resolved to a type

练习搭建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不会自动导入。

 

posted @ 2017-08-19 12:06  蒲公草  阅读(2817)  评论(0编辑  收藏  举报