Introduction to Spring MVC
What is Spring MVC
- A web framework built around the principles of Spring
- POJO based and Interface driven
- Based on a Dispatcher Servlet/Front Controller pattern
MVC stands for Model-View-Controller - Very lightweight and unobtrusive compared to other frameworks
- Built from the shortcomings of Struts 1
- Support for:
Themes
Locales/i18n
Restful services
Annotation based configuration
Seamless integration with other Spring Services/Beans
-------------------------------------------------------
History
-----------------------------------------------------------
Architecture
---------------------------------------------------------------
Request/ Response Lifecycle
-----------------------------------------------------------
Vocabulary
- DispatcherServlet - The entry/ configuration point for the Application
- Controller - Command pattern object that handles the request and determines which view to route to
- RequestMapping - The url and request type that a method is tied to
- ViewResolver - Used to locate JSP pages or whatever view we are using
- Servlet-config - Configuration file per DispatcherServlet
- POJO - Plain Old Java Object
- Bean - A Spring configured POJO
---------------------------------------------------------------
Summary
- J2EE Based
- Built around best practice patterns
- Stable release cycle
- Backwards compatible
- Very active community
- Lightweight and unobtrusive
- Flexible to use with Web Services, Javascript UI, standard HTML, etc...
---------------------------------------------------------
Spring MVC - Building
https://blog.****.net/u012596785/article/details/79880312