1.
public class DispatcherServlet extends FrameworkServlet
public abstract class FrameworkServlet extendsHttpServletBeanimplements ApplicationContextAware
public abstract class HttpServletBean extendsHttpServletimplements EnvironmentCapable, EnvironmentAware
2.
HttpServletBean=>init()=>initServletBean()
3.
FrameworkServlet重写initServletBean()
initServletBean()内有调用initWebApplicationContext()方法
configureAndRefreshWebApplicationContext(cwac)方法内wac.refresh();
接着
!!!!!!!FrameworkServlet中WebApplicationContext为空的时候生成XmlWebApplicationContext
!!!!!!!ContextLoaderListener中WebApplicationContext为空的时候生成XmlWebApplicationContext