Package org.springframework.web.servlet.mvc.method.annotation
@NonNullApi
@NonNullFields
package org.springframework.web.servlet.mvc.method.annotation
MVC infrastructure for annotation-based handler method processing, building on the
org.springframework.web.method.annotation
package. Entry points are
RequestMappingHandlerMapping
and RequestMappingHandlerAdapter
.-
ClassDescriptionA convenient base class for
ResponseBodyAdvice
implementations that customize the response before JSON serialization withAbstractJackson2HttpMessageConverter
's concrete subclasses.A base class for resolving method argument values by reading from the body of a request withHttpMessageConverters
.ExtendsAbstractMessageConverterMethodArgumentResolver
with the ability to handle method return values by writing to the response withHttpMessageConverters
.Handles return values of typeWebAsyncTask
.Handles return values of typeCallable
.No-op resolver for method arguments of typeContinuation
.AnAbstractHandlerMethodExceptionResolver
that resolves exceptions through@ExceptionHandler
methods.Subclass ofServletRequestDataBinder
that adds URI template variables to the values used for data binding.ResolvesHttpEntity
andRequestEntity
method argument values, as well as return values of typeHttpEntity
,ResponseEntity
,ErrorResponse
andProblemDetail
.HandlesHttpHeaders
return values.ARequestBodyAdvice
implementation that adds support for Jackson's@JsonView
annotation declared on a Spring MVC@HttpEntity
or@RequestBody
method parameter.AResponseBodyAdvice
implementation that adds support for Jackson's@JsonView
annotation declared on a Spring MVC@RequestMapping
or@ExceptionHandler
method.Resolves arguments of typeMap
annotated with@MatrixVariable
where the annotation does not specify a name.Resolves arguments annotated with@MatrixVariable
.Handles return values of typeModelAndView
copying view and model information to theModelAndViewContainer
.This return value handler is intended to be ordered after all others as it attempts to handle _any_ return value type (i.e.Creates instances ofUriComponentsBuilder
by pointing to@RequestMapping
methods on Spring MVC controllers.Builder class to create URLs for method arguments.Method invocation information.ResolvesMap
method arguments annotated with@PathVariable
where the annotation does not specify a path variable name.Resolves method arguments annotated with an @PathVariable
.Resolves an argument of typePrincipal
, similar toServletRequestMethodArgumentResolver
but irrespective of whether the argument is annotated or not.Resolves method arguments of typeRedirectAttributes
.Resolves method arguments annotated with an @RequestAttribute
.Allows customizing the request before its body is read and converted into an Object and also allows for processing of the resulting Object before it is passed into a controller method as an@RequestBody
or anHttpEntity
method argument.A convenient starting point for implementingRequestBodyAdvice
with default method implementations.CreatesRequestMappingInfo
instances from type and method-level@RequestMapping
annotations in@Controller
classes.Resolves the following method arguments: Annotated with @RequestPart
Of typeMultipartFile
in conjunction with Spring'sMultipartResolver
abstraction Of typejakarta.servlet.http.Part
in conjunction with Servlet multipart requestsResolves method arguments annotated with@RequestBody
and handles return values from methods annotated with@ResponseBody
by reading and writing to the body of the request or response with anHttpMessageConverter
.Allows customizing the response after the execution of an@ResponseBody
or aResponseEntity
controller method but before the body is written with anHttpMessageConverter
.A controller method return value type for asynchronous request processing where one or more objects are written to the response.A simple holder of data to be written along with a MediaType hint for selecting a message converter to write with.Handler for return values of typeResponseBodyEmitter
and subclasses such asSseEmitter
including the same types wrapped withResponseEntity
.A class with an@ExceptionHandler
method that handles all Spring MVC raised exceptions by returning aResponseEntity
with RFC 7807 formatted error details in the body.AnAbstractCookieValueMethodArgumentResolver
that resolves cookie values from anHttpServletRequest
.ExtendsInvocableHandlerMethod
with the ability to handle return values through a registeredHandlerMethodReturnValueHandler
and also supports setting the response status based on a method-level@ResponseStatus
annotation.A Servlet-specificModelAttributeMethodProcessor
that applies data binding through a WebDataBinder of typeServletRequestDataBinder
.Creates aServletRequestDataBinder
.Resolves servlet backed request-related method arguments.Resolves servlet backed response-related method arguments.A Servlet-specificAbstractWebArgumentResolverAdapter
that creates aNativeWebRequest
fromServletRequestAttributes
.Resolves method arguments annotated with an @SessionAttribute
.A specialization ofResponseBodyEmitter
for sending Server-Sent Events.A builder for an SSE event.A controller method return value type for asynchronous request processing where the application can write directly to the responseOutputStream
without holding up the Servlet container thread.Supports return values of typeStreamingResponseBody
and alsoResponseEntity<StreamingResponseBody>
.Resolvers argument values of typeUriComponentsBuilder
.Handles return values that are of typeView
.Handles return values of typesvoid
andString
interpreting them as view name reference.