Spring Learning (v) SPRINGMVC

Source: Internet
Author: User

In our blog post on Simple Spring (iv) Spring instance analysis, we can understand how the spring framework works and how it is implemented, and then we'll go on to explain an extended product in spring--spring MVC

1. Introduction to Spring MVC

Before you start demo spring, let's first introduce sprig MVC. Spring MVC is a MODEL2 MVC framework that revolves around Dispatcherservlet's core class, Dispatcherservlet is the responsibility of spring MVC to intercept client requests and organize different components for request processing. Respond to the processing results. The overall implementation of the framework diagram is shown in the following illustration:

2. Spring MVC Analysis

After a rough look at spring MVC, we do an example analysis of a simple spring MVC, and the reference instance has a link address at the end of the article. The analysis is mainly carried out from the following aspects:

A, enabling the framework

Enabling spring MVC is similar to Struts1, a simple servlet. HTTP requests are sent through the client, and the Web application server accepts and determines whether to match the request path of the Spring MVC core class Dispatcherservlet, and if the match is forwarded to dispatcherservlet for processing. The reference example given by the specific Web.xml file configuration reference. Corresponds to the following section of the above figure:

This section is a servlet run process that has nothing to do with the Spring MVC framework itself, but simply forwards the request to the core class of spring MVC, and if you have any doubts, please refer to the previous article servlets to understand the servlet run process.

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.