欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

spring源码学习系列3.4-spring mvc原理-codes 博客分类: spring spring

程序员文章站 2024-02-12 20:37:58
...
本篇章从核心类角度解读springmvc的原理

web.xml(一级):

DispatcherServlet
extends FrameworkServlet
extends HttpServletBean
extends HttpServlet
<servlet>    
        <servlet-name>SpringMVC</servlet-name>    
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>    
        <init-param>    
            <param-name>contextConfigLocation</param-name>    
            <param-value>classpath*:spring-mvc.xml</param-value>    
        </init-param>    
    </servlet>    
        
    <servlet-mapping>    
        <servlet-name>SpringMVC</servlet-name>    
        <url-pattern>/</url-pattern>    
    </servlet-mapping>


Map<String, HandlerMapping> matchingBeans =
					BeanFactoryUtils.beansOfTypeIncludingAncestors(context, HandlerMapping.class, true, false);




spring-mvc.xml(二级):

DispatcherServlet.properties

HandlerMapping

HandlerExecutionChain


HandlerAdapter

ViewResolver


HandlerExceptionResolver




注解(二级):

RequestMappingHandlerMapping

RequestMappingHandlerAdapter

HandlerMethodArgumentResolver  RequestResponseBodyMethodProcessor   HttpMessageConverter

HandlerMethodReturnValueHandler  RequestResponseBodyMethodProcessor  HttpMessageConverter

https://www.cnblogs.com/fangjian0423/p/springMVC-xml-json-convert.html
https://my.oschina.net/u/2377110/blog/1552979




参考:
http://www.cnblogs.com/doudouxiaoye/p/5793657.html
相关标签: spring