Skip to main content

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