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.
Author
Arjen Poutsma
Author
Rossen Stoyanchev
Author
Juergen Hoeller
Since
3.1
AbstractNamedValueMethodArgumentResolver()AbstractNamedValueMethodArgumentResolver(beanFactory: ConfigurableBeanFactory) |
fun resolveArgument(parameter: MethodParameter, mavContainer: ModelAndViewContainer, webRequest: NativeWebRequest, binderFactory: WebDataBinderFactory): Any |
abstract fun supportsParameter(parameter: MethodParameter): Boolean
Whether the given MethodParameter is supported by this resolver. |
abstract class AbstractCookieValueMethodArgumentResolver : AbstractNamedValueMethodArgumentResolver
A base abstract class to resolve method arguments annotated with An A WebDataBinder may be invoked to apply type conversion to the resolved cookie value. |
|
open class ExpressionValueMethodArgumentResolver : AbstractNamedValueMethodArgumentResolver
Resolves method arguments annotated with An A WebDataBinder may be invoked to apply type conversion to resolved argument value. |
|
open class MatrixVariableMethodArgumentResolver : AbstractNamedValueMethodArgumentResolver
Resolves arguments annotated with MatrixVariable. If the method parameter is of type Map it will by 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). |
|
open class PathVariableMethodArgumentResolver : AbstractNamedValueMethodArgumentResolver, UriComponentsContributor
Resolves method arguments annotated with an @PathVariable. An @PathVariable is a named value that gets resolved from a URI template variable. It is always required and does not have a default value to fall back on. See the base class org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver for more information on how named values are processed. If the method parameter type is Map, the name specified in the annotation is used to resolve the URI variable String value. The value is then converted to a Map via type conversion, assuming a suitable Converter or PropertyEditor has been registered. A WebDataBinder is invoked to apply type conversion to resolved path variable values that don't yet match the method parameter type. |
|
open class RequestAttributeMethodArgumentResolver : AbstractNamedValueMethodArgumentResolver
Resolves method arguments annotated with an @RequestAttribute. |
|
open class RequestHeaderMethodArgumentResolver : AbstractNamedValueMethodArgumentResolver
Resolves method arguments annotated with An A WebDataBinder is invoked to apply type conversion to resolved request header values that don't yet match the method parameter type. |
|
open class RequestParamMethodArgumentResolver : AbstractNamedValueMethodArgumentResolver, UriComponentsContributor
Resolves method arguments annotated with @RequestParam, arguments of type MultipartFile in conjunction with Spring's MultipartResolver abstraction, and arguments of type If the method parameter type is Map, the name specified in the annotation is used to resolve the request parameter String value. The value is then converted to a Map via type conversion assuming a suitable Converter or PropertyEditor has been registered. Or if a request parameter name is not specified the RequestParamMapMethodArgumentResolver is used instead to provide access to all request parameters in the form of a map. A WebDataBinder is invoked to apply type conversion to resolved request header values that don't yet match the method parameter type. |
|
open class SessionAttributeMethodArgumentResolver : AbstractNamedValueMethodArgumentResolver
Resolves method arguments annotated with an @SessionAttribute. |