Custom HandlerAdapter
Learn Custom HandlerAdapter (Advanced Spring MVC, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Fresher Notes HandlerAdapter is the strategy interface that lets DispatcherServlet invoke any kind of handler; a custom one teaches Spring MVC to call a handler type it does not know. Two methods : supports(Object handler) says whether the adapter fits, and handle(request, response, handler) runs it and returns a ModelAndView . Registration : declare the adapter as a @Bean ; the servlet finds every HandlerAdapter bean in the context.
More lessons in Advanced Spring MVC
- Custom HandlerMapping
- Custom ViewResolver
- Custom Argument Resolver
- HandlerMethodArgumentResolver
- Custom Return Value Handler
- HandlerMethodReturnValueHandler
- Custom Formatter
- Custom Converter
- Custom Interceptor
- Custom Exception Resolver
- Custom Message Converter
- Custom Annotation
- Request Lifecycle Customization
- Mini Project: Asynchronous Requests: Callable, DeferredResult and Server-Sent Events