HandlerAdapter¶
HandlerAdapter is a component within the Spring MVC framework that acts as a bridge between the DispatcherServlet and the actual handler (the controller) processing the request.^[600-developer__java__spring__DispatcherServlet.md]
It functions as an adapter for the HTTP request handler, allowing the DispatcherServlet to invoke handlers regardless of the specific interface they implement.^[600-developer__java__spring__DispatcherServlet.md]
Implementations¶
The framework provides several concrete implementations of the HandlerAdapter interface to support different types of handlers:
- HttpRequestHandlerAdapter: Designed to handle handlers that implement the
HttpRequestHandlerinterface^[600-developer__java__spring__DispatcherServlet.md]. - SimpleControllerHandlerAdapter: Designed to handle handlers that implement the
Controllerinterface^[600-developer__java__spring__DispatcherServlet.md]. - RequestMappingHandlerAdapter: Supports annotated controllers, typically those using the
@RequestMappingannotation^[600-developer__java__spring__DispatcherServlet.md].
Related Interfaces¶
- [[HttpRequestHandler]]
- [[Controller]]
Sources¶
600-developer__java__spring__DispatcherServlet.md