创建Spring项目 IOException parsing XML document from class path resource [ApplicationContext.xml];

创建Spring项目时出现以下错误

org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [ApplicationContext.xml]; nested exception is java.io.FileNotFoundException: class path resource [ApplicationContext.xml] cannot be opened because it does not exist

将ApplicationContext.xml文件放在启动文件的同目录或者放在src文件下,或者放在整个程序下,都无法解决。最后我将该文件 放入resources下就成功了。

posted @ 2020-10-26 15:49  DurianTRY  阅读(4608)  评论(0编辑  收藏  举报