SSH集成失败

严重: action: null
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
Caused by: java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be opened because it does not exist

一个在struts+Hibernate框架的项目实现了全部的功能后, 加入spring框架后 就报了这样的错误.

挺无奈,看书,查资料,看视频,各有各的说法,也试过了 , 都没有成功.

检查发现
web.xml里面没有配置和spring的集成
[code="xml"]
contextConfigLocation
/WEB-INF/applicationContext-*.xml,classpath*:applicationContext-*.xml


org.springframework.web.context.ContextLoaderListener
[/code]
另外还少了两个包 commons-beanutils.jar,commons-digester.jar

从 FileNotFoundException 可以看出是系统没有找到你的 Spring配置文件,
如果可以的话,你可以加我Q3990995,你把示例发给我,我帮你解决问题,然后公布问题在什么地方:)

[code="xml"]

contextConfigLocation
/WEB-INF/classes/applicationContext.xml

[/code]
你把你的spring配置文件命名为applicationContext.xml 然后放到工程src目录下,系统会自动帮你拷贝到/WEB-INF/classes/下面去的

[code="xml"]

contextConfigLocation
/WEB-INF/applicationContext-*.xml,classpath*:applicationContext-*.xml

[/code]
你也可以通过*号通配符,来配置多个配置文件,classpath*的意思就是类路径下面