首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web开发 >

org.springframework.beans.factory.BeanDefinitionStoreException 怪异有关问题

2012-08-07 
org.springframework.beans.factory.BeanDefinitionStoreException 怪异问题org.springframework.beans.fa

org.springframework.beans.factory.BeanDefinitionStoreException 怪异问题

org.springframework.beans.factory.BeanDefinitionStoreException: 
IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; 
nested exception is java.io.FileNotFoundException:
 Could not open ServletContext resource [/WEB-INF/applicationContext.xml]

但是applicationContext.xml是在我的src路径下,而不是/WEB-INF下,是其他问题引起的吗?


[解决办法]
spring默认回去WEB-INF下去找,你在web.xml中配置:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext*.xml</param-value>
</context-param>
就可以了。

热点排行