java spring 配置文件_[Java教程]Spring配置文件

[Java教程]Spring配置文件

0

2016-03-19 00:00:08

Spring配置文件是集成了Spring框架的项目的核心,引擎从哪里开始,中间都执行了哪些操作,小谈一下它的执行流程。

容器先是加载web.

接着是applicationContext.

一种方法是加入ContextLoaderServlet这个servletcontextConfigLocation/WEB-INF/applicationContext.context org.springframework.web.context.ContextLoaderServlet 0

还有一种是添加ContextLoaderListener这个监听器contextConfigLocation/WEB-INF/applicationContext.org.springframework.web.context.ContextLoaderListener

ContextLoaderServlet和ContextLoaderListener都是先创建ContextLoader的一个对象,然后调用它的initWebApplicationContex方法初始化WebApplicationContext获得一个对象;

spring加载多个配置文件,在web.contextConfigLocationclasspath*:spring/*.SpringContextServlet org.springframework.web.context.ContextLoaderServlet 3

文章出自:http://www.cnblogs.com/mabaishui/archive/2010/07/14/1777233.html

本文网址:http://www.shaoqun.com/a/202912.html

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:admin@shaoqun.com。

Spring

0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值