Let us see the flow of spring MVC (3.2). I am not going to describe what is M,V,C
hope you already know that mess right ? so lets start with the flow…
Spring MVC 3.2 Execution Flow
Step 1: First request will be received by DispatcherServlet
Step 2: DispatcherServlet will take the help of HandlerMapping and get to know theController class name associated with the given request
Step 3: So request transfer to the Controller, and then controller will process the request by executing appropriate methods and returns ModeAndView object (contains Model data and View name) back to the DispatcherServlet
Step 4: Now DispatcherServlet send the model object to the ViewResolver to get the actual view page
Step 5: Finally DispatcherServlet will pass the Model object to the View page to display the result
That’s it 
Just remember this diagram for the interview purpose, i will explain you the practical flow in the first example.
http://www.java4s.com/spring-mvc/spring-mvc-execution-flow-diagram-spring-mvc-3-2-flow/
本文详细介绍了Spring MVC 3.2的工作流程,包括从接收请求到响应生成的全过程。主要步骤涉及DispatcherServlet接收请求、通过HandlerMapping找到控制器、控制器处理请求返回ModelAndView、使用ViewResolver解析视图并最终显示结果。


被折叠的 条评论
为什么被折叠?



