interface HandlerMethodArgumentResolver
Strategy interface for resolving method parameters into argument values in the context of a given request.
Author
Arjen Poutsma
Since
3.1
See Also
HandlerMethodReturnValueHandler
abstract fun resolveArgument(parameter: MethodParameter, mavContainer: ModelAndViewContainer, webRequest: NativeWebRequest, binderFactory: WebDataBinderFactory): Any
Resolves a method parameter into an argument value from a given request. A ModelAndViewContainer provides access to the model for the request. A WebDataBinderFactory provides a way to create a WebDataBinder instance when needed for data binding and type conversion purposes. |
|
abstract fun supportsParameter(parameter: MethodParameter): Boolean
Whether the given MethodParameter is supported by this resolver. |
abstract class AbstractNamedValueMethodArgumentResolver : HandlerMethodArgumentResolver
Abstract base class for resolving method arguments from a named value. Request parameters, request headers, and path variables are examples of named values. Each may have a name, a required flag, and a default value. Subclasses define how to do the following:
A default value string can contain ${...} placeholders and Spring Expression Language #{...} expressions. For this to work a ConfigurableBeanFactory must be supplied to the class constructor. A WebDataBinder is created to apply type conversion to the resolved argument value if it doesn't match the method parameter type. |
|
abstract class AbstractWebArgumentResolverAdapter : HandlerMethodArgumentResolver
An abstract base class adapting a WebArgumentResolver to the HandlerMethodArgumentResolver contract. Note: This class is provided for backwards compatibility. However it is recommended to re-write a |
|
open class ErrorsMethodArgumentResolver : HandlerMethodArgumentResolver
Resolves Errors method arguments. An |
|
open class MapMethodProcessor : HandlerMethodArgumentResolver, HandlerMethodReturnValueHandler
Resolves Map method arguments and handles Map return values. A Map return value can be interpreted in more than one ways depending on the presence of annotations like |
|
open class MatrixVariableMapMethodArgumentResolver : HandlerMethodArgumentResolver
Resolves arguments of type Map annotated with where |
|
open class ModelAttributeMethodProcessor : HandlerMethodArgumentResolver, HandlerMethodReturnValueHandler
Resolve Model attributes are obtained from the model or created with a default constructor (and then added to the model). Once created the attribute is populated via data binding to Servlet request parameters. Validation may be applied if the argument is annotated with When this handler is created with |
|
open class ModelMethodProcessor : HandlerMethodArgumentResolver, HandlerMethodReturnValueHandler
Resolves Model arguments and handles Model return values. A Model return type has a set purpose. Therefore this handler should be configured ahead of handlers that support any return value type annotated with |
|
open class PathVariableMapMethodArgumentResolver : HandlerMethodArgumentResolver
Resolves Map method arguments annotated with an @PathVariable where the annotation does not specify a path variable name. The created Map contains all URI template name/value pairs. |
|
open class RedirectAttributesMethodArgumentResolver : HandlerMethodArgumentResolver
Resolves method arguments of type RedirectAttributes. This resolver must be listed ahead of org.springframework.web.method.annotation.ModelMethodProcessor and org.springframework.web.method.annotation.MapMethodProcessor, which support Map and Model arguments both of which are "super" types of |
|
open class RequestHeaderMapMethodArgumentResolver : HandlerMethodArgumentResolver
Resolves Map method arguments annotated with The created Map contains all request header name/value pairs. The method parameter type may be a MultiValueMap to receive all values for a header, not only the first one. |
|
open class RequestParamMapMethodArgumentResolver : HandlerMethodArgumentResolver
Resolves Map method arguments annotated with an @RequestParam where the annotation does not specify a request parameter name. See RequestParamMethodArgumentResolver for resolving Map method arguments with a request parameter name. The created Map contains all request parameter name/value pairs. If the method parameter type is MultiValueMap instead, the created map contains all request parameters and all there values for cases where request parameters have multiple values. |
|
open class ServletRequestMethodArgumentResolver : HandlerMethodArgumentResolver
Resolves request-related method argument values of the following types:
|
|
open class ServletResponseMethodArgumentResolver : HandlerMethodArgumentResolver
Resolves response-related method argument values of types:
|
|
open class SessionStatusMethodArgumentResolver : HandlerMethodArgumentResolver
Resolves a SessionStatus argument by obtaining it from the ModelAndViewContainer. |
|
open class UriComponentsBuilderMethodArgumentResolver : HandlerMethodArgumentResolver
Resolvers argument values of type UriComponentsBuilder. The returned instance is initialized via |