Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我收到此代码错误:
@RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:applicationContext.xml" })
错误:
file not found exception
请帮我。
您应该搜索 applicationContext.xml 的位置。它必须在类路径中。我建议您检查它是否在类目录中。如果不是,您应该或将 applicationContext.xml 文件移动到将被过滤到类目录的源文件夹或更改单元测试中的位置。