1.DispatcherServlet:获取servlet的name

2.XmlWebApplicationContext:获取contentConfigLocation的xml名称和namespace的值,如果没有找到默认是【servletName】-servlet.xml

3.XmlBeanDefinitionReader:定位xml路径,读取xml配置文件,并解析

4.AutowiredAnnotationBeanPostProcessor:支持@autowired注解,扫描带注解的类,将有@autowired的属性注入实例,在bean容器没有找到,并指定了required=true,就会抛出异常

5.RequestMappingHandlerMapping:获取controller中定义的requestMapping的所有属性,包括value,methods,parames,headers,consumes,produces,custom,同时可获取方法名和参数类型。

至此初始化过程完成,等待请求处理

相关文章:

  • 2021-09-07
  • 2022-12-23
  • 2021-07-31
  • 2021-04-19
  • 2021-09-15
  • 2021-11-11
猜你喜欢
  • 2021-07-05
  • 2021-05-28
  • 2022-12-23
  • 2022-12-23
  • 2021-10-01
  • 2022-12-23
  • 2021-05-31
相关资源
相似解决方案