[Turn] SpringMVC source code analysis series

Speaking of java mvc framework, struts2 and springmvc surely we all know, struts2 design basically completely out of the Servlet container, and springmvc is relying on the Servlet container elements design while springmvc based on the Spring Framework, Spring Framework presumably out of java students are familiar with.

Spring entered the official website to find such an array of eye-catching text, spring allows us to construct a simple, portable, fast and easy to extend jvm-based systems and applications.

Yes, also be configured system with these characteristics is based on MVC SpringMVC Spring framework.

 

 

5.1 from the landlord began to write the first chapter "SpringMVC Getting Started" began, and now almost almost two months, after another, after writing several articles about SpringMVC source code analysis of the article.

Some students want to study in depth SpringMVC source or want to learn about SpringMVC, you can refer to this series of articles.

 

Ado, this series of articles are based on Spring4.0.2 version , the landlord time to write out to 4.0.2, is the latest, and now the latest version is 4.0.5.

 

Read the article order:

  1. SpringMVC entry

    SpringMVC introductory article, no contact SpringMVC for some students, you can read the following to understand the structure and use this framework to entry students can choose not to see ~

  2.  SpringMVC core distributor DispatcherServlet analysis

    SpringMVC inlet Servlet -> DispatcherServlet analysis, explaining the role of the parent class DispatcherServlet FrameworkServlet FrameworkServlet and the parent HttpServletBean

  3.  How to explain SpringMVC request time is finding the right Controller

    Want to know how http request is to find a way corresponding to the Controller of you, this process in the end what happened, you know? Benpian will you answer it.

  4.  A method in SpringMVC Detailed Controller parameters work in

    Students have thought http request after the find method Controller in the corresponding method of argument is how it came to be injected? such as:

       public String method(HttpServletRequest request, String name) {
         ...
        }

    Here HttpServletRequest type of request parameters and parameter of type String name is automatically injected into how the method method? The main role is two interfaces: HandlerMethodArgumentResolver (processing request parameter) and HandlerMethodReturnValueHandler (return value processing). The paper also wrote HandlerMethodArgumentResolver a custom interface implementation class FormObjArgumentResolver, Controller of such processing method in handling multiple parameters define classes from (recommend reading the article and then type conversion depends on the specific implementation code for this class).

  5.  SpringMVC on principle json, xml automatic conversion of research

    By json, xml automatic conversion of the fourth article of the consolidation of knowledge, automatic conversion is handled by RequestResponseBodyMethodProcessor, which implements the HandlerMethodArgumentResolver and HandlerMethodReturnValueHandler interface.

    6. The  SPRINGMVC type conversion, data binding Detailed

    After introducing the concept of property editor and support for the Spring property editor, you can look back on digestion knowledge achieved in the first four of FormObjArgumentResolver.

  7.  SpringMVC interceptor Detailed

    Explain the design principles SpringMVC interceptors.

  8. The  SPRINGMVC Detailed view mechanism

    SpringMVC analyzed mechanisms of view, the main role is to explain ViewResolver View and the two interfaces. After writing also wrote a small Tucao redirection of view RedirectView: SpringMVC redirect small analysis view RedirectView .

  9. The  SPRINGMVC exception handling mechanism Explanation

    Explain the design principles SpringMVC exception mechanism.

 

Additional knowledge:

  Spring in Ordered Interface Overview

 

Some students want to learn the knowledge of the series is not mentioned, then, if they feel appropriate, the landlord will continue to write about the content of the blog.

 

Currently these blog has been placed on GitHub:  https://github.com/fangjian0423/springmvc-source-minibook

 

Can also be read online, or download the pdf, MONI, epub: https://www.gitbook.com/book/fangjian0423/springmvc-source-minibook/details

 

Finally, attach Spring4.0.2 official document: http://docs.spring.io/spring/docs/4.0.2.RELEASE/spring-framework-reference/htmlsingle/

 

 

------ 2017.07.28 21:20:21 updated, drew a process flow diagram of SpringMVC


---------------------
作者:format丶
来源:CNBLOGS
原文:https://www.cnblogs.com/fangjian0423/p/springMVC-directory-summary.html
版权声明:本文为作者原创文章,转载请附上博文链接!

Guess you like

Origin www.cnblogs.com/webfactory/p/11462906.html