spring 容器1初始化

1:从ContextLoader.properties获取实例化的applicationContext 默认为XmlWebApplicationContext

2:设置父容器

3:设置contextId 可配置

4:配置 ConfigurableEnvironment

5:定制Context 初始化

6:执行 refresh

7:把 conetx 设置到 servletContext   key=WebApplicationContext.class.getName() + ".ROOT"

8:把conetx  设置到ContextLoad 中 可通过getCurrentWebApplicationContext 获取

8: 加载资源  用 resourceLoader

9:解析xml 用Document 

猜你喜欢

转载自xuyunti.iteye.com/blog/2273530