@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {“classpath:applicationContext.xml”})
在测试类前面加入这个
java单元测试中自动注入
最新推荐文章于 2025-06-17 10:13:24 发布
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {“classpath:applicationContext.xml”})
在测试类前面加入这个