The Dispatcher Servlet

Опубликовано: 07 Июнь 2026
на канале: JavaAnatomy
290
11

Also known as Front Controller

Spring MVC, as many other web frameworks, is designed around the front controller pattern, where a central Servlet the DispatcherServlet, provides a shared algorithm for request processing, while actual work is performed by configurable delegate components. This model is flexible and supports diverse workflows.

The DispatcherServlet, as any Servlet, needs to be declared and mapped according to the Servlet specification by using Java configuration or in web.xml.

The Dispatcher Servlet delegates to special beans to process requests and render the appropriate responses. By “special beans” we mean Spring-managed Object instances that implement framework contracts. Those usually come with built-in contracts, but you can customize their properties and extend or replace them.

spring-boot-starter-web
spring-web
spring-webmvc
spring-boot-starter
spring-boot-starter-JSON - Jackson
Embedded tomcat

Beans
Message converter
LocaleResolver
HandlerMapping
ExceptionResolver
HandlerAdapter
Controller
ViewResolver
Model
View
Content Type Manager
Request
Response

GitHub repo
[email protected]:java-space/springboot.git

Slides
https://drive.google.com/drive/folder...