A diagram to clarify the working principle of SPRINGMVC

Source: Internet
Author: User
first, let's start by recognizing the main components of SPRINGMVC. Front-end Controller (disatcherservlet): Receive request, response result, return can be json,string data type, also can be page (Model). Processor Mapper (handlermapping): Locate the processor based on the URL, typically through an XML configuration or annotation. Processor (Handler): That's what we often say about controller controllers, written by programmers. Processor Adapter (Handleradapter): The processor can be packaged as an adapter so that multiple types of processors can be supported. View Parser (Viewresovler): View resolution, return View object (common Jsp,freemark, etc.). Second, the working principle of SPINGMVC

The following is a text step description in


: 1, the user sends a request to the front-end controller (Dispatcherservlet). 2, the front-end controller requests the processor mapper (handlermapping) to locate the processor (Handler). 3, locate the later Processor Mapper (handlermappering) to return the execution chain (Handlerexecutionchain) to the front-end controller. 4, the front-end controller (Dispatcherservlet) calls the processor adapter (Handleradapter) to execute the processor (Handler). 5, the processor adapter to perform the handler. 6, the processor finishes executing the processor adapter to return Modelandview. 7, the processor adapter returns Modelandview to the front-end controller. 8, the front-end controller requests the View parser (Viewresolver) to parse the view. 9, the View resolver returns view to the front-end controller. 10, the front-end controller renders the view. 11, the front-end controller responds to the user with the result.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.