MVC stands for Model-View-Controller design pattern which separates the business logic, presentation logic and navigation logic.
Spring MVC framework uses the DispatcherServlet
class as the controller which is responsible for handling all the requests and responses.
controller
with the help of HandlerMapping
.Service
method and returns a ModeAndView
object to the DispatcherServlet
which contains the model data and view name.DispatcherServlet
sends the view name to ViewResolver
which sends the actual view to the DispatcherServlet.DispatcherServlet
will pass the model data to the View and render response.