spring 之web配置

Processes a "contextConfigLocation" context-param and passes its value to the context instance, parsing it into potentially multiple file paths which can be separated by any number of commas and spaces, e.g. "WEB-INF/applicationContext1.xml, WEB-INF/applicationContext2.xml". Ant-style path patterns are supported as well, e.g. "WEB-INF/*Context.xml,WEB-INF/spring*.xml" or "WEB-INF/**/*Context.xml". If not explicitly specified, the context implementation is supposed to use a default location (with XmlWebApplicationContext: "/WEB-INF/applicationContext.xml").


<display-name></display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
     classpath:applicationContext-dao.xml
     classpath:applicationContext-service.xml
     classpath:applicationContext-web.xml
     classpath:applicationContext-common.xml
    </param-value>
</context-param>


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

ContextLoaderListener 可配置参数
contextInitializerClasses 上下文实例化类

你可能感兴趣的:(spring)