求高手解答,配置的地址是没错的。
3 回答
西昆仑
TA贡献4条经验 获得超2个赞
因为你的AreaDaoTest不是交由spring管理的啊,所以AreaDaoTest也不是spring帮你实例化出来的,spring就更不可能知道你的AreaDaoTest依赖于AreaDao
试试在你的AreaDaoTest上注解,注意locations换成你自己的配置文件
@RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"classpath*:/spring/servlet.xml","classpath*:/spring/common.xml"})
添加回答
举报
0/150
提交
取消