@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
@jakarta.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.
| Modifier and Type | Field and Description |
|---|---|
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | ModelAttributeMethodArgumentResolver(ReactiveAdapterRegistry
for adapting to other reactive types from and to Mono adapterRegistry, boolean if "true", non-simple method arguments and
return values are considered model attributes with or without a
useDefaultResolution)@ModelAttribute annotation present.Class constructor with a default resolution mode flag. |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | bindingDisabled(MethodParameter parameter)
Determine if binding should be disabled for the supplied |
| protected Mono | bindRequestParameters(WebExchangeDataBinder
the data binder instance to use for the binding binder, ServerWebExchange the current request exchange)Extension point to bind the request to the target object. |
| protected Mono | constructAttribute(WebExchangeDataBinder
the data binder instance to use for the binding binder, ServerWebExchange the current exchange exchange)Extension point to create the attribute, binding the request to constructor args. |
| private boolean | |
| private Mono | initDataBinder(String name, MethodParameter parameter, BindingContext context, ServerWebExchange exchange)
|
| private Object | |
| public Mono | resolveArgument(MethodParameter
the method parameter parameter, BindingContext the binding context to use context, ServerWebExchange the current exchange exchange)Implements org. Resolve the value for the method parameter. |
| public boolean | supportsParameter(MethodParameter
the method parameter parameter)Implements org. Whether this resolver supports the given method parameter. |
| private void | validateIfApplicable(WebExchangeDataBinder binder, MethodParameter parameter, ServerWebExchange exchange)
|
| useDefaultResolution | back to summary |
|---|---|
| private final boolean useDefaultResolution | |
| ModelAttributeMethodArgumentResolver | back to summary |
|---|---|
| public ModelAttributeMethodArgumentResolver(ReactiveAdapterRegistry adapterRegistry, boolean useDefaultResolution) Class constructor with a default resolution mode flag.
| |
| bindingDisabled | back to summary |
|---|---|
| private boolean bindingDisabled(MethodParameter parameter) Determine if binding should be disabled for the supplied
| |
| bindRequestParameters | back to summary |
|---|---|
| protected Mono Extension point to bind the request to the target object.
| |
| constructAttribute | back to summary |
|---|---|
| protected Mono Extension point to create the attribute, binding the request to constructor args.
| |
| hasErrorsArgument | back to summary |
|---|---|
| private boolean hasErrorsArgument(MethodParameter parameter) | |
| initDataBinder | back to summary |
|---|---|
| private Mono | |
| removeReactiveAttribute | back to summary |
|---|---|
private Object removeReactiveAttribute(String name, Model model)
| |
| resolveArgument | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Resolve the value for the method parameter.
| |
| supportsParameter | back to summary |
|---|---|
| public boolean supportsParameter(MethodParameter parameter) Implements org. Doc from org. Whether this resolver supports the given method parameter.
| |
| validateIfApplicable | back to summary |
|---|---|
| private void validateIfApplicable(WebExchangeDataBinder binder, MethodParameter parameter, ServerWebExchange exchange) | |