On principle SpringMVC

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/weixin_39207535/article/details/79703983
 Implementation process

  1, the client requests submitted to DispatherServlet ( front controller )

  2, the DispatherServlet controller by querying one or more HanderMapping ( Request Mapping ) , corresponding to the processing request is found Controller

  3, after the inquiry Dispatherservlet request will be submitted to the Controller ( page controller )

  . 4, the Controller after a call processing request service logic, returned to ModelAndView

  5, the DispatherServlet query one or more ViewResoler ( view resolver ), to find the corresponding view

  6, the view will return the results to the client

     The above-mentioned components and SpringMVC Detailed not mentioned:]

        DispatherServlet: Front controller configured in the web.xml file. Intercepts the request matches (not intercept jsp), Servlet matching rules to define their own interception, the interception down the request, distributed to the target Controller according to appropriate rules to deal

        HanderMapping: Request mappings map the request to the processor (that is, who are going to process the request) - Find the definition of controller request, to match the url and the bean by name, to find controller

        HanderAdapter: processing adapter, SpringMVC by HandlerAdapter to actually call handler

        ViewResolver : view resolver, find the page for processing returned

       controller: page controller, motion controller processor. Responsible for handling requests distributed by DispatcherServlet, it requests the user service data after a treatment layer. Package Model, the Model and then returned for display to the corresponding View

        LocalResolver: Localization

              MultipaterResolver: File Upload parser

             ExceptionResolver: exception handler

            ModelAndView : model-- application state (entity attribute)

                                                   - respond to status inquiries (get method)

                                                   - expose application functions (dao and service)

                                         generating response data HTML display view--

                                                - request model update trigger event

                                               - provide html, human-computer interaction form

Guess you like

Origin blog.csdn.net/weixin_39207535/article/details/79703983