3. DispatcherServlet 初始化
看看 handlermapping 和 handleradapter都是怎么初始化的 HttpServletBean public final void init() throws ServletException { ....... //在这里 this.initServletBean(); } servlet的初始化方法 在HttpServletBean 实现了 FrameworkServlet.initServletBean 初始化了springcontext环境 protected final void initServletBean() throws ServletException { ....... try { //初始化WebApplicationContext this.webApplicationContext = this.initWebApplicationContext(); this.initFrameworkServlet(); } catch (RuntimeException | ServletException var4) { this.logger.error("Context initialization failed", var4); throw var4; } . ....... } protected