spring-framework / org.springframework.web.method.annotation / ModelMethodProcessor

ModelMethodProcessor

open class ModelMethodProcessor : HandlerMethodArgumentResolver, HandlerMethodReturnValueHandler

Resolves Model arguments and handles Model return values.

A Model 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.

Author
Rossen Stoyanchev

Since
3.1

Constructors

<init>

ModelMethodProcessor()

Resolves Model arguments and handles Model return values.

A Model 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.

Functions

handleReturnValue

open fun handleReturnValue(returnValue: Any, returnType: MethodParameter, mavContainer: ModelAndViewContainer, webRequest: NativeWebRequest): Unit

resolveArgument

open fun resolveArgument(parameter: MethodParameter, mavContainer: ModelAndViewContainer, webRequest: NativeWebRequest, binderFactory: WebDataBinderFactory): Any

supportsParameter

open fun supportsParameter(parameter: MethodParameter): Boolean

supportsReturnType

open fun supportsReturnType(returnType: MethodParameter): Boolean