–> original link <–
The Spring Framework is light-weight container, supporting multiple frameworks and libraries.
The Spring MVC:
– Takes the advantage of Spring framework
– Web development framework based on the MVC design pattern.
– Features: Pluggable View technology and Injection of services into controllers.
Pluggable View technology: view technologies such as JSP, Titles, Velocity,… Spring framework allows us to use these technologies.
Injection of services into controllers: IoC container provides the important functionality of the dependency injection. This helps the programmer to inject the dependency such as business service at runtime -> save a lot of code duplication and coding effort.
Spring’s MVC components:
The class org.springframework.ui.ModelMap is used to hold the data. It wraps the business data into rg.springframework.ui.ModelMap class and then pass it to the view.
Framework provides pluggable view, allow dev to create views using jsp, velocity, jasper templates. In Spring MVC Logical view and Model are represented in the object of the class org.springframework.web.servlet.ModelAndView.
The controller is responsible for handling all the requests from the user and then process the user request. Here are the list of controllers available in the Spring 2.5 framework: