救急 请教spring的配置问题

图片说明
Configuration problem: Failed to import bean definitions from URL location [classpath:applicationContext-common.xml]

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

错误消息说在classpath中找不到applicationContext-common.xml文件
如果你是用maven,要把这个文件放到resource文件夹中

如果不是 maven 那么直接将该文件放在 src 目录下。
可以贴出你的配置文件目录结构看看是不是正确。

将applicationContext-common.xml文件放在类路径下,如果是用的idea开发工具,就放在resource下,还有一种方法,就是通过代码书写加载xml配置文件的路径,可自行查阅相关资料

你是不是在其他的Spring配置文件里 import了 applicationContext-common.xml ? 我看到你这个目录下的文件写的是 applicationContext-comm.xml , 然后发现 applicationContext-common.xml 这个文件找不到 , 是不是文件名字写错了 ? 如果是这种情况的话 , 要么改文件名 , 要么在其他配置文件中将引用这个文件的地方改一下