本文主要是介绍Caused by: java.io.FileNotFoundException: class path resource [applicationContext] cannot be ...,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
报错信息:
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext] cannot be opened because it does not exist
Caused by: java.io.FileNotFoundException: class path resource [applicationContext] cannot be opened because it does not exist
原因:
ClassPathXmlApplicationContext()内的配置文件路径写错,或者文件名后面没有加上.xml扩展名。
例如
错误示例:
正确示例:
这篇关于Caused by: java.io.FileNotFoundException: class path resource [applicationContext] cannot be ...的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!