Class MatrixVariableMapMethodArgumentResolver

java.lang.Object
org.springframework.web.reactive.result.method.HandlerMethodArgumentResolverSupport
org.springframework.web.reactive.result.method.annotation.MatrixVariableMapMethodArgumentResolver
All Implemented Interfaces:
HandlerMethodArgumentResolver, SyncHandlerMethodArgumentResolver

public class MatrixVariableMapMethodArgumentResolver extends HandlerMethodArgumentResolverSupport implements SyncHandlerMethodArgumentResolver
Resolves arguments of type Map annotated with @MatrixVariable where the annotation does not specify a name. In other words the purpose of this resolver is to provide access to multiple matrix variables, either all or associated with a specific path variable.

When a name is specified, an argument of type Map is considered to be a single attribute with a Map value, and is resolved by MatrixVariableMethodArgumentResolver instead.

Since:
5.0.1
Author:
Rossen Stoyanchev
See Also:
  • Constructor Details

    • MatrixVariableMapMethodArgumentResolver

      public MatrixVariableMapMethodArgumentResolver(org.springframework.core.ReactiveAdapterRegistry registry)
  • Method Details

    • supportsParameter

      public boolean supportsParameter(org.springframework.core.MethodParameter parameter)
      Description copied from interface: HandlerMethodArgumentResolver
      Whether this resolver supports the given method parameter.
      Specified by:
      supportsParameter in interface HandlerMethodArgumentResolver
      Parameters:
      parameter - the method parameter
    • resolveArgumentValue

      @Nullable public Object resolveArgumentValue(org.springframework.core.MethodParameter parameter, BindingContext bindingContext, org.springframework.web.server.ServerWebExchange exchange)
      Description copied from interface: SyncHandlerMethodArgumentResolver
      Resolve the value for the method parameter synchronously.
      Specified by:
      resolveArgumentValue in interface SyncHandlerMethodArgumentResolver
      Parameters:
      parameter - the method parameter
      bindingContext - the binding context to use
      exchange - the current exchange
      Returns:
      the resolved value, if any