私はwebappを再構成しています。ディスパッチャーサーブレットからすべてをContextLoaderListenerに移動したいspring mvc; contextConfigLocationロードオーダー
質問1、私は複数のアプリケーション・コンテキストxmlファイルを持っている場合は、それがどのような順序それらがロードされない(これは、この質問の範囲を超えて、セキュリティ構成の変更によるものですか)?たとえば、context:component-scanを含むxmlファイルは、xmlファイルがDAOとサービスBeanを指定する前にロードする必要がありますか?
質問2、(または、この議論の余地がある?)どのように私はC_applicationContext.xml前にロードすべきA_applicationContext.xmlがB_applicationContext.xml前にロードする必要があると仮定してロードされている_applicationContext.xmlを*順序を指定します
次のように私のweb.xmlは次のとおりです。
<web-app id="WebApp_ID" version="2.4"
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">
<servlet>
<servlet-name>AssessmentDelivery</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AssessmentDelivery</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/config/*_applicationContext.xml</param-value>
</context-param>
<!-- security filter -->
<filter>
\t \t <filter-name>springSecurityFilterChain</filter-name>
\t \t <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
\t </filter>
\t <filter-mapping>
\t \t <filter-name>springSecurityFilterChain</filter-name>
\t \t <url-pattern>/*</url-pattern>
\t </filter-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
</web-app>