View.
A null return value is left as-is leaving it to the configured
RequestToViewNameTranslator to select a view name by convention.
A View 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.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | handleReturnValue(Object
the value returned from the handler method returnValue, MethodParameter the type of the return value. This type must have
previously been passed to returnType, ModelAndViewContainer supportsReturnType which must
have returned true.the ModelAndViewContainer for the current request mavContainer, NativeWebRequest the current request webRequest)Implements org. Handle the given return value by adding attributes to the model and
setting a view or setting the
|
| public boolean | supportsReturnType(MethodParameter
the method return type to check returnType)Implements org. Whether the given method return type is supported by this handler. |
| ViewMethodReturnValueHandler | back to summary |
|---|---|
| public ViewMethodReturnValueHandler() | |
| handleReturnValue | back to summary |
|---|---|
| public void handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception Implements org. Doc from org. Handle the given return value by adding attributes to the model and
setting a view or setting the
| |
| supportsReturnType | back to summary |
|---|---|
| public boolean supportsReturnType(MethodParameter returnType) Implements org. Doc from org. Whether the given method return type is supported by this handler.
| |