Skip to main content

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