In Spring MVC, the Controller's methods are the final destination point that a web request can reach. After being invoked, the Controller's method starts to process the web request by interacting with the Service layer to complete whatever work needs to be done. Usually, the Service layer executes business operations on domain objects and calls the Persistence layer to update the domain objects. After the processing is completed by the Service layer object, the Controller is responsible for updating and building up the model
object and chooses a View for the user to see next as a response.
Remember that Spring MVC always keeps the Controllers unaware of any View technology used. That's why the Controller returns only the logical View name, and later DispatcherServlet
consults with ViewResolver
to find out the exact View to render. According to the Controller, the Model is a collection of arbitrary Java objects and the View is identified by a logical...