Home >Java >javaTutorial >How SpringMVC works

How SpringMVC works

Guanhui
GuanhuiOriginal
2020-05-28 15:14:122496browse

How SpringMVC works

SpringMVC working principle

1. The user sends an http request to the front-end controller DispatchServlet

2. The front-end controller calls Processor mapper HandlerMapping

3. The processor mapper finds the specific processor (can be found through xml and annotations), generates the processor and processor interceptor and returns them to DispatchServlet

4. The front-end controller calls the processor adapter

5. The processor adapter finds the specific processor (Controller)

6. After the Controller processes it, it returns ModelAndView to the processor adapter

7. The processor adapter returns the ModelAndView to the front-end controller

8. The front-end controller passes the ModelAndView to the view parser

9. After the ViewResource is parsed, it returns the specific VIew

10. The front-end controller renders the view based on the View (fills the model data into the view)

11. Returns the rendered view to the front-end controller

12. The front-end controller Respond the view to the user

Video tutorial recommendation

马兵spring video tutorial

Java Multithreading and Concurrency Library Advanced Application Video Tutorial

JAVA Elementary Introduction Video Tutorial

Article Recommendation: "Java

The above is the detailed content of How SpringMVC works. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn