关于spring的配置文件存放位置有关问题

关于spring的配置文件存放位置问题
对于sping的应用,一直是马马虎虎,包括现在。今天在做一个spingMVC的例子的时候,web.xml中关于spring的listener的参数配置抛出了异常,我试了两次,总结个大概,方便以后的开发中查看。
我们一般的web.xml文件中这样写的:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">

    <display-name>Contacts Sample Application</display-name>
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>
			/WEB-INF/applicationContext-security.xml
			classpath:applicationContext-common-business.xml
		</param-value>
	</context-param>

	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>

 	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>
</web-app>


在其中的
<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>
			/WEB-INF/applicationContext-security.xml
			classpath:applicationContext-common-business.xml
		</param-value>
	</context-param>
这里,<param-name></param-name>如果不是contextConfigLocation容器默认会在WEB-INF下查找,即使你写的是classpath:***,系统也是在WEB-INF下查找的。如果你是叫contextConfigLocation,那就OK了,问题解决。