Spring MVC
Spring MVC
1 Overview
MVC (Model-View-Controller) is a pattern in software design commonly used to implement user interfaces, data, and controlling logic.
It emphasizes a separation between the software’s business logic and display.
This “separation of concerns” provides for a better division of labor and improved maintenance. Some other design patterns are based on MVC, such as MVVM (Model-View-Viewmodel), MVP (Model-View-Presenter), and MVW (Model-View-Whatever).
The three parts of the MVC software-design pattern can be described as follows:
- Model: Manages data and business logic.
- View: Handles layout and display.
- Controller: Routes commands to the model and view parts.
2 Spring MVC
The Spring Web model-view-controller (MVC) framework is designed around a DispatcherServlet that dispatches requests to handlers, with configurable handler mappings, view resolution, locale and theme resolution as well as support for uploading files.
The default handler is based on the @Controller and @RequestMapping annotations, offering a wide range of flexible handling methods.
With the introduction of Spring 3.0, the @Controller mechanism also allows you to create RESTful Web sites and applications, through the @PathVariable annotation and other features.