当前位置: 代码迷 >> Web前端 >> 在web.xml中透过contextConfigLocation配置spring
  详细解决方案

在web.xml中透过contextConfigLocation配置spring

热度:108   发布时间:2012-08-08 14:32:45.0
在web.xml中通过contextConfigLocation配置spring
<context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath*:conf/spring/applicationContext_core*.xml,
            classpath*:conf/spring/applicationContext_dict*.xml,
            classpath*:conf/spring/applicationContext_hibernate.xml,
            classpath*:conf/spring/applicationContext_staff*.xml,
            classpath*:conf/spring/applicationContext_security.xml
            classpath*:conf/spring/applicationContext_modules*.xml
            classpath*:conf/spring/applicationContext_cti*.xml
            classpath*:conf/spring/applicationContext_apm*.xml
        </param-value>
    </context-param> 


contextConfigLocation 参数定义了要装入的 Spring 配置文件。

如果想装入多个配置文件,可以在 <param-value> 标记中用逗号作分隔符。
  相关解决方案