spring-framework / org.springframework.web.reactive.result.method.annotation

Package org.springframework.web.reactive.result.method.annotation

Types

AbstractMessageWriterResultHandler

abstract class AbstractMessageWriterResultHandler : HandlerResultHandlerSupport

Abstract base class for result handlers that handle return values by writing to the response with HttpMessageWriter.

CookieValueMethodArgumentResolver

open class CookieValueMethodArgumentResolver : AbstractNamedValueSyncArgumentResolver

Resolve method arguments annotated with @CookieValue.

An @CookieValue is a named value that is resolved from a cookie. It has a required flag and a default value to fall back on when the cookie does not exist.

ErrorsMethodArgumentResolver

open class ErrorsMethodArgumentResolver : HandlerMethodArgumentResolverSupport

Resolve Errors or BindingResult method arguments. An Errors argument is expected to appear immediately after the model attribute in the method signature.

ExpressionValueMethodArgumentResolver

open class ExpressionValueMethodArgumentResolver : AbstractNamedValueSyncArgumentResolver

Resolves method arguments annotated with @Value.

An @Value does not have a name but gets resolved from the default value string, which may contain ${...} placeholder or Spring Expression Language #{...} expressions.

HttpEntityArgumentResolver

open class HttpEntityArgumentResolver : AbstractMessageReaderArgumentResolver

Resolves method arguments of type HttpEntity or RequestEntity by reading the body of the request through a compatible HttpMessageReader.

MatrixVariableMapMethodArgumentResolver

open class MatrixVariableMapMethodArgumentResolver : HandlerMethodArgumentResolverSupport, SyncHandlerMethodArgumentResolver

Resolves arguments of type Map annotated with where

MatrixVariableMethodArgumentResolver

open class MatrixVariableMethodArgumentResolver : AbstractNamedValueSyncArgumentResolver

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).

ModelArgumentResolver

open class ModelArgumentResolver : HandlerMethodArgumentResolverSupport, SyncHandlerMethodArgumentResolver

Resolver for a controller method argument of type Model that can also be resolved as a java.util.Map.

ModelAttributeMethodArgumentResolver

open class ModelAttributeMethodArgumentResolver : HandlerMethodArgumentResolverSupport

Resolve @ModelAttribute annotated method arguments.

Model attributes are sourced from the model, or created using a default constructor and then added to the model. Once created the attribute is populated via data binding to the request (form data, query params). Validation also may be applied if the argument is annotated with @javax.validation.Valid or Spring's own @org.springframework.validation.annotation.Validated.

When this handler is created with useDefaultResolution=true any non-simple type argument and return value is regarded as a model attribute with or without the presence of an @ModelAttribute.

PathVariableMapMethodArgumentResolver

open class PathVariableMapMethodArgumentResolver : HandlerMethodArgumentResolverSupport, SyncHandlerMethodArgumentResolver

Resolver for Map method arguments also annotated with PathVariable where the annotation does not specify a path variable name. The resulting Map argument is a coyp of all URI template name-value pairs.

PathVariableMethodArgumentResolver

open class PathVariableMethodArgumentResolver : AbstractNamedValueSyncArgumentResolver

Resolves method arguments annotated with @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.

PrincipalArgumentResolver

open class PrincipalArgumentResolver : HandlerMethodArgumentResolverSupport

Resolves method argument value of type java.security.Principal.

RequestAttributeMethodArgumentResolver

open class RequestAttributeMethodArgumentResolver : AbstractNamedValueSyncArgumentResolver

Resolves method arguments annotated with an @RequestAttribute.

RequestBodyArgumentResolver

open class RequestBodyArgumentResolver : AbstractMessageReaderArgumentResolver

Resolves method arguments annotated with @RequestBody by reading the body of the request through a compatible HttpMessageReader.

An @RequestBody method argument is also validated if it is annotated with @javax.validation.Valid or org.springframework.validation.annotation.Validated. Validation failure results in an ServerWebInputException.

RequestHeaderMapMethodArgumentResolver

open class RequestHeaderMapMethodArgumentResolver : HandlerMethodArgumentResolverSupport, SyncHandlerMethodArgumentResolver

Resolves Map method arguments annotated with @RequestHeader. For individual header values annotated with @RequestHeader see RequestHeaderMethodArgumentResolver instead.

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.

RequestHeaderMethodArgumentResolver

open class RequestHeaderMethodArgumentResolver : AbstractNamedValueSyncArgumentResolver

Resolves method arguments annotated with @RequestHeader except for Map arguments. See RequestHeaderMapMethodArgumentResolver for details on Map arguments annotated with @RequestHeader.

An @RequestHeader is a named value resolved from a request header. It has a required flag and a default value to fall back on when the request header does not exist.

A ConversionService is invoked to apply type conversion to resolved request header values that don't yet match the method parameter type.

RequestParamMapMethodArgumentResolver

open class RequestParamMapMethodArgumentResolver : HandlerMethodArgumentResolverSupport, SyncHandlerMethodArgumentResolver

Resolver for Map method arguments annotated with 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.

RequestParamMethodArgumentResolver

open class RequestParamMethodArgumentResolver : AbstractNamedValueSyncArgumentResolver

Resolver for method arguments annotated with @RequestParam from URI query string parameters.

This resolver can also be created in default resolution mode in which simple types (int, long, etc.) not annotated with @RequestParam are also treated as request parameters with the parameter name derived from the argument name.

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 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.

RequestPartMethodArgumentResolver

open class RequestPartMethodArgumentResolver : AbstractMessageReaderArgumentResolver

Resolver for @RequestPart arguments where the named part is decoded much like an @RequestBody argument but based on the content of an individual part instead. The arguments may be wrapped with a reactive type for a single value (e.g. Reactor Mono, RxJava Single).

This resolver also supports arguments of type Part which may be wrapped with are reactive type for a single or multiple values.

ServerWebExchangeArgumentResolver

open class ServerWebExchangeArgumentResolver : HandlerMethodArgumentResolverSupport, SyncHandlerMethodArgumentResolver

Resolves ServerWebExchange-related method argument values of the following types:

  • ServerWebExchange
  • ServerHttpRequest
  • ServerHttpResponse
  • HttpMethod
  • Locale
  • TimeZone
  • ZoneId
  • UriBuilder or UriComponentsBuilder -- for building URL's relative to the current request

For the WebSession see WebSessionArgumentResolver and for the Principal see PrincipalArgumentResolver.

SessionAttributeMethodArgumentResolver

open class SessionAttributeMethodArgumentResolver : AbstractNamedValueArgumentResolver

Resolves method arguments annotated with an @SessionAttribute.

SessionStatusMethodArgumentResolver

open class SessionStatusMethodArgumentResolver : SyncHandlerMethodArgumentResolver

Resolver for a SessionStatus argument obtaining it from the BindingContext.

WebSessionArgumentResolver

open class WebSessionArgumentResolver : HandlerMethodArgumentResolverSupport

Resolves method argument value of type WebSession.