HandlerMethodReturnValueHandler
Learn HandlerMethodReturnValueHandler (Advanced Spring MVC, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Fresher Notes HandlerMethodReturnValueHandler is the strategy interface that processes the value a controller method returns: it chooses a view, writes the body or sets headers. Contract : supportsReturnType(MethodParameter) and handleReturnValue(Object, MethodParameter, ModelAndViewContainer, NativeWebRequest) . Built-ins : RequestResponseBodyMethodProcessor (for @ResponseBody ), ViewNameMethodReturnValueHandler and HttpEntityMethodProcessor .
More lessons in Advanced Spring MVC
- Custom HandlerMapping
- Custom HandlerAdapter
- Custom ViewResolver
- Custom Argument Resolver
- HandlerMethodArgumentResolver
- Custom Return Value Handler
- 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