Class ModelAndViewMethodReturnValueHandler

java.lang.Object
org.springframework.web.servlet.mvc.method.annotation.ModelAndViewMethodReturnValueHandler
All Implemented Interfaces:
HandlerMethodReturnValueHandler

public class ModelAndViewMethodReturnValueHandler extends Object implements HandlerMethodReturnValueHandler
Handles return values of type ModelAndView copying view and model information to the ModelAndViewContainer.

If the return value is null, the ModelAndViewContainer.setRequestHandled(boolean) flag is set to true to indicate the request was handled directly.

A ModelAndView return type has a set purpose. Therefore this handler should be configured ahead of handlers that support any return value type annotated with @ModelAttribute or @ResponseBody to ensure they don't take over.

Since:
3.1
Author:
Rossen Stoyanchev