class path resource [applicationContext.xml] cannot be opened because it does not exist
翻译:没有找到你的 .xml 配置文件
在Test测试类中我使用的是:
ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
获取配置文件。
ClassPathXmlApplicationContext()方法是在其所在的目录中寻找 .xml 配置文件。
点击 File -> Project Structure,选择Modules -> Paths -> Output Paths
修改为 applicationContext.xml 文件所在目录。
IDEA中Spring配置错误:class path resource [.xml] cannot be opened because it does not exist
原文:https://www.cnblogs.com/yihangjou/p/11909648.html