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
原因
报这个错误的原因是因为,打包的时候没有一起打包 smm 的配置文件。
这是我工程目录的结构:
而我在pom.xml文件中的配置一开始是这样的:
可以看到在 中并没有加入 resources 文件夹,也因此导致了项目部署时,报了配置文件找不到的错误。
解决
在 中添加你 ssm 的所有配置文件
src/main/resources
**/*.properties
**/*.xml
false
参考:https://blog.youkuaiyun.com/lv1321821792/article/details/93725060
==========================