spring-framework / org.springframework.web.reactive.result.method.annotation / ModelAttributeMethodArgumentResolver

ModelAttributeMethodArgumentResolver

open class ModelAttributeMethodArgumentResolver : HandlerMethodArgumentResolverSupport

Resolve @ModelAttribute annotated method arguments.

Model attributes are sourced from the model, or created using a default constructor and then added to the model. Once created the attribute is populated via data binding to the request (form data, query params). Validation also may be applied if the argument is annotated with @javax.validation.Valid or Spring's own @org.springframework.validation.annotation.Validated.

When this handler is created with useDefaultResolution=true any non-simple type argument and return value is regarded as a model attribute with or without the presence of an @ModelAttribute.

Author
Rossen Stoyanchev

Author
Juergen Hoeller

Since
5.0

Constructors

<init>

ModelAttributeMethodArgumentResolver(adapterRegistry: ReactiveAdapterRegistry, useDefaultResolution: Boolean)

Class constructor with a default resolution mode flag.

Functions

resolveArgument

open fun resolveArgument(parameter: MethodParameter, context: BindingContext, exchange: ServerWebExchange): Mono<Any>

supportsParameter

open fun supportsParameter(parameter: MethodParameter): Boolean

Inherited Functions

getAdapterRegistry

open fun getAdapterRegistry(): ReactiveAdapterRegistry

Return the configured ReactiveAdapterRegistry.