Class DispatcherHandler

java.lang.Object
org.springframework.web.reactive.DispatcherHandler
All Implemented Interfaces:
Aware, ApplicationContextAware, PreFlightRequestHandler, webHandler

public class DispatcherHandler extends Object implements webHandler, PreFlightRequestHandler, ApplicationContextAware
Central dispatcher for HTTP request handlers/controllers. Dispatches to registered handlers for processing a request, providing convenient mapping facilities.

DispatcherHandler discovers the delegate components it needs from Spring configuration. It detects the following in the application context:

DispatcherHandler is also designed to be a Spring bean itself and implements ApplicationContextAware for access to the context it runs in. If DispatcherHandler is declared as a bean with the name "webHandler", it is discovered by webHttpHandlerBuilder.applicationContext(ApplicationContext) which puts together a processing chain together with webFilter, webExceptionHandler and others.

A DispatcherHandler bean declaration is included in @EnablewebFlux configuration.

Since:
5.0
Author:
Rossen Stoyanchev, Sebastien Deleuze, Juergen Hoeller
See Also: