摘要: 说明 前面我们看到了是dispatcher负责组件的初始化 调用链: org.springframework.web.servlet.HttpServletBean#init -> org.springframework.web.servlet.FrameworkServlet#initServle 阅读全文
posted @ 2020-01-14 16:56 意犹未尽 阅读(329) 评论(0) 推荐(0) 编辑
摘要: 说明 spring mvc 入口是通过配置Servlte来作为框架入口。servlte可以配置多个,每个Servlte都会初始化一个WebApplicationContext parent为root 注:httpServlet的init是 第一次访问的时候调用 配置例子 <servlet> <ser 阅读全文
posted @ 2020-01-14 14:48 意犹未尽 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 说明 Root WebApplicationContext 因为容器有父子关系 只是表示是最父级WebApplicationContext WebApplicationContext是一个接口 默认使用的是XmlWebApplicationContext 1.传统spring mvc配置 <!-- 阅读全文
posted @ 2020-01-14 13:32 意犹未尽 阅读(644) 评论(0) 推荐(0) 编辑