场景
在SSM项目整合时引入spring-test单元测试时,
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"classpath:applicationContext.xml"})
报错。
pom.xml中引入依赖如下
此依赖是从Maven中央仓库直接复制过来的
解决
将pom.xml中的spring-test的依赖中的<scope>去掉
在SSM项目整合时引入spring-test单元测试时,
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"classpath:applicationContext.xml"})
报错。
pom.xml中引入依赖如下
此依赖是从Maven中央仓库直接复制过来的
将pom.xml中的spring-test的依赖中的<scope>去掉