public class ErrorsMethodArgumentResolver extends java.lang.Object implements HandlerMethodArgumentResolver
Errors
or BindingResult
method arguments.
An Errors
argument is expected to appear immediately after the
model attribute in the method signature.Modifier and Type | Field and Description |
---|---|
private ReactiveAdapterRegistry |
adapterRegistry |
Constructor and Description |
---|
ErrorsMethodArgumentResolver(ReactiveAdapterRegistry registry)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
ReactiveAdapterRegistry |
getAdapterRegistry()
Return the configured
ReactiveAdapterRegistry . |
private java.lang.String |
getModelAttributeName(MethodParameter parameter) |
<any> |
resolveArgument(MethodParameter parameter,
BindingContext context,
ServerWebExchange exchange)
The returned
Mono may produce one or zero values if the argument
does not resolve to any value, which will result in null passed
as the argument value. |
boolean |
supportsParameter(MethodParameter parameter) |
private final ReactiveAdapterRegistry adapterRegistry
public ErrorsMethodArgumentResolver(ReactiveAdapterRegistry registry)
registry
- for adapting to other reactive types from and to Monopublic ReactiveAdapterRegistry getAdapterRegistry()
ReactiveAdapterRegistry
.public boolean supportsParameter(MethodParameter parameter)
supportsParameter
in interface HandlerMethodArgumentResolver
public <any> resolveArgument(MethodParameter parameter, BindingContext context, ServerWebExchange exchange)
HandlerMethodArgumentResolver
Mono
may produce one or zero values if the argument
does not resolve to any value, which will result in null
passed
as the argument value.resolveArgument
in interface HandlerMethodArgumentResolver
parameter
- the method parametercontext
- the binding context to useexchange
- the current exchangeprivate java.lang.String getModelAttributeName(MethodParameter parameter)