Class MatrixVariableMethodArgumentResolver
java.lang.Object
org.springframework.web.reactive.result.method.HandlerMethodArgumentResolverSupport
org.springframework.web.reactive.result.method.annotation.AbstractNamedValueArgumentResolver
org.springframework.web.reactive.result.method.annotation.AbstractNamedValueSyncArgumentResolver
org.springframework.web.reactive.result.method.annotation.MatrixVariableMethodArgumentResolver
- All Implemented Interfaces:
HandlerMethodArgumentResolver
,SyncHandlerMethodArgumentResolver
Resolves arguments annotated with
@MatrixVariable
.
If the method parameter is of type Map
it will be resolved by
MatrixVariableMapMethodArgumentResolver
instead unless the annotation
specifies a name in which case it is considered to be a single attribute of
type map (vs multiple attributes collected in a map).
- Since:
- 5.0.1
- Author:
- Rossen Stoyanchev
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.web.reactive.result.method.annotation.AbstractNamedValueArgumentResolver
AbstractNamedValueArgumentResolver.NamedValueInfo
-
Field Summary
Fields inherited from class org.springframework.web.reactive.result.method.HandlerMethodArgumentResolverSupport
logger
-
Constructor Summary
ConstructorDescriptionMatrixVariableMethodArgumentResolver
(ConfigurableBeanFactory factory, ReactiveAdapterRegistry registry) -
Method Summary
Modifier and TypeMethodDescriptioncreateNamedValueInfo
(MethodParameter parameter) Create theAbstractNamedValueArgumentResolver.NamedValueInfo
object for the given method parameter.protected void
handleMissingValue
(String name, MethodParameter parameter) Invoked when a named value is required, butAbstractNamedValueArgumentResolver.resolveName(String, MethodParameter, ServerWebExchange)
returnednull
and there is no default value.protected Object
resolveNamedValue
(String name, MethodParameter param, ServerWebExchange exchange) Actually resolve the value synchronously.boolean
supportsParameter
(MethodParameter parameter) Whether this resolver supports the given method parameter.Methods inherited from class org.springframework.web.reactive.result.method.annotation.AbstractNamedValueSyncArgumentResolver
resolveArgument, resolveArgumentValue, resolveName
Methods inherited from class org.springframework.web.reactive.result.method.annotation.AbstractNamedValueArgumentResolver
handleMissingValue, handleResolvedValue
Methods inherited from class org.springframework.web.reactive.result.method.HandlerMethodArgumentResolverSupport
checkAnnotatedParamNoReactiveWrapper, checkParameterType, checkParameterTypeNoReactiveWrapper, getAdapterRegistry
-
Constructor Details
-
MatrixVariableMethodArgumentResolver
public MatrixVariableMethodArgumentResolver(@Nullable ConfigurableBeanFactory factory, ReactiveAdapterRegistry registry)
-
-
Method Details
-
supportsParameter
Description copied from interface:HandlerMethodArgumentResolver
Whether this resolver supports the given method parameter.- Parameters:
parameter
- the method parameter
-
createNamedValueInfo
protected AbstractNamedValueArgumentResolver.NamedValueInfo createNamedValueInfo(MethodParameter parameter) Description copied from class:AbstractNamedValueArgumentResolver
Create theAbstractNamedValueArgumentResolver.NamedValueInfo
object for the given method parameter. Implementations typically retrieve the method annotation by means ofMethodParameter.getParameterAnnotation(Class)
.- Specified by:
createNamedValueInfo
in classAbstractNamedValueArgumentResolver
- Parameters:
parameter
- the method parameter- Returns:
- the named value information
-
resolveNamedValue
@Nullable protected Object resolveNamedValue(String name, MethodParameter param, ServerWebExchange exchange) Description copied from class:AbstractNamedValueSyncArgumentResolver
Actually resolve the value synchronously.- Specified by:
resolveNamedValue
in classAbstractNamedValueSyncArgumentResolver
-
handleMissingValue
protected void handleMissingValue(String name, MethodParameter parameter) throws ServerWebInputException Description copied from class:AbstractNamedValueArgumentResolver
Invoked when a named value is required, butAbstractNamedValueArgumentResolver.resolveName(String, MethodParameter, ServerWebExchange)
returnednull
and there is no default value. Subclasses typically throw an exception in this case.- Overrides:
handleMissingValue
in classAbstractNamedValueArgumentResolver
- Parameters:
name
- the name for the valueparameter
- the method parameter- Throws:
ServerWebInputException
-