您的位置:首页 > 编程语言 > Java开发

spring----contextConfigLocation

2015-09-30 11:06 489 查看
web.xml里的contextConfigLocation参数定义了要装入的 Spring 配置文件。

xml代码类似如下:

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/spring/applicationContext*.xml
</param-value>
</context-param>

这里是给ContextLoaderListener指定要加载的xml,会去加载相应的xml,

容器对于web.xml的加载过程是context-param >> listener  >> fileter  >> servlet。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: