标签:
org.springframework.beans.factory.BeanDefinitionStoreException:
IOException parsing XML document from ServletContext resource [/WEB-INF/beans.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/beans.xml]
Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/beans.xml] |
<!-- needed for ContextLoaderListener -->
<!-- 指定spring配置文件的位置 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<!-- 可以成功加载配置文件 -->
<!-- <param-value>/WEB-INF/classes/beans.xml,/WEB-INF/classes/action-beans.xml</param-value> -->
<!-- 不能成功加载配置文件 -->
<!-- <param-value>/WEB-INF/beans.xml,/WEB-INF/action-beans.xml</param-value> -->
<!-- 可以成功加载配置文件 -->
<!-- <param-value>classpath:*beans.xml</param-value> -->
<!-- 不能成功加载配置文件 -->
<!-- <param-value>classpath:beans.xml,action-beans.xml</param-value> -->
<!-- 可以成功加载配置文件 -->
<param-value>classpath:beans.xml,classpath:action-beans.xml</param-value>
</context-param>
<!-- Bootstraps the root web application context before servlet initialization -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
|
Do not use classpath.
This may cause problems with different ClassLoaders (container vs. application). WEB-INF is always the better choice.
|
SSH集成org.springframework.beans.factory.BeanDefinitionStoreException: IOException
标签:
原文地址:http://blog.csdn.net/shijiebei2009/article/details/43370077