spring mvc的工作流程

Spring MVC is a web framework which is used for building flexible and loosely coupled web applications. Using underneath the model-view-controller design pattern, the layers in an application are successfully separated. The data necessary for the application is incapsulated into the Models, rendered by the Views and processed by the Controllers.

spring mvc的工作流程

  • A request is sent to the DispatcherServlet
  • The DispatcherServlet matches the controller associated with the request through the MappingHandler
  • The Controller processes the request and returns a ModelAndView object containing the model data and the view name to be rendered
  • The DispatcherServlet sends the view name to a ViewResolver to find the actual View to be invoked
  • The DispatcherServlet will pass the model object to the View to render the result
  • The view along with its model object will render the result

More information is available at the springsource.org link http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/mvc.html

https://wiki.opennms.org/wiki/Annotation_Driven_Controllers