Spring MVC Components

Learn about the Spring MVC architecture components, namely Model, View, and Controller.

Spring MVC request flow

All incoming requests to a Spring MVC application are handled by the front controller called the DispatcherServlet. This front controller is part of the Spring JAR files and the developer is not required to implement it.

The front controller delegates an incoming request to other components of the application. The controllers contain the business logic, the model contains the data, and views are the pages that render that data. The controller class populates the model and sends it to the front controller. The front controller forwards it to the view resolver which resolves the view that renders the model to the client. The big picture of the process is shown below:

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.