Spring源码阅览:ContextLoaderListener

Spring源码阅读:ContextLoaderListenerspring在web中的启动是由ContextLoaderListener开始的。ContextLoade

Spring源码阅读:ContextLoaderListener
spring在web中的启动是由ContextLoaderListener开始的。ContextLoaderListener实现了ServlContextListener接口,并继承了ContextLoader类。

                wac.setParent(parent);        wac.setServletContext(sc);       //获取configLocation的配置        wac.setConfigLocation(sc.getInitParameter(CONFIG_LOCATION_PARAM));        customizeContext(sc, wac);// 用于自定义ContextClass时,扩充自定义Context        wac.refresh();// 完成context构造过程。