Package | Description |
---|---|
org.springframework.test.web.servlet.setup |
Contains built-in
MockMvcBuilder implementations. |
org.springframework.web.method.annotation |
Support classes for annotation-based handler method processing.
|
org.springframework.web.method.support |
Generic support classes for handler method processing.
|
org.springframework.web.servlet.config.annotation |
Annotation-based setup for Spring MVC.
|
org.springframework.web.servlet.mvc.method.annotation |
MVC infrastructure for annotation-based handler method processing, building on the
org.springframework.web.method.annotation package. |
Modifier and Type | Method and Description |
---|---|
StandaloneMockMvcBuilder |
StandaloneMockMvcBuilder.setCustomReturnValueHandlers(HandlerMethodReturnValueHandler... handlers)
Provide custom handlers for controller method return values.
|
Modifier and Type | Class and Description |
---|---|
class |
MapMethodProcessor
|
class |
ModelAttributeMethodProcessor
Resolve
@ModelAttribute annotated method arguments and handle
return values from @ModelAttribute annotated methods. |
class |
ModelMethodProcessor
|
Modifier and Type | Interface and Description |
---|---|
interface |
AsyncHandlerMethodReturnValueHandler
A return value handler that supports async types.
|
Modifier and Type | Class and Description |
---|---|
class |
HandlerMethodReturnValueHandlerComposite
Handles method return values by delegating to a list of registered
HandlerMethodReturnValueHandlers . |
Modifier and Type | Method and Description |
---|---|
List<HandlerMethodReturnValueHandler> |
HandlerMethodReturnValueHandlerComposite.getHandlers()
Return a read-only list with the registered handlers, or an empty list.
|
Modifier and Type | Method and Description |
---|---|
HandlerMethodReturnValueHandlerComposite |
HandlerMethodReturnValueHandlerComposite.addHandler(HandlerMethodReturnValueHandler handler)
Add the given
HandlerMethodReturnValueHandler . |
Modifier and Type | Method and Description |
---|---|
HandlerMethodReturnValueHandlerComposite |
HandlerMethodReturnValueHandlerComposite.addHandlers(List<? extends HandlerMethodReturnValueHandler> handlers)
Add the given
HandlerMethodReturnValueHandlers . |
Modifier and Type | Method and Description |
---|---|
protected List<HandlerMethodReturnValueHandler> |
WebMvcConfigurationSupport.getReturnValueHandlers()
Provide access to the shared return value handlers used by the
RequestMappingHandlerAdapter and the ExceptionHandlerExceptionResolver . |
Modifier and Type | Method and Description |
---|---|
void |
WebMvcConfigurerAdapter.addReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers)
Deprecated.
Add handlers to support custom controller method return value types.
|
protected void |
DelegatingWebMvcConfiguration.addReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers) |
default void |
WebMvcConfigurer.addReturnValueHandlers(List<HandlerMethodReturnValueHandler> handlers)
Add handlers to support custom controller method return value types.
|
protected void |
WebMvcConfigurationSupport.addReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers)
Add custom
HandlerMethodReturnValueHandlers
in addition to the ones registered by default. |
Modifier and Type | Class and Description |
---|---|
class |
AbstractMessageConverterMethodProcessor
Extends
AbstractMessageConverterMethodArgumentResolver with the ability to handle method
return values by writing to the response with HttpMessageConverters . |
class |
AsyncTaskMethodReturnValueHandler
Handles return values of type
WebAsyncTask . |
class |
CallableMethodReturnValueHandler
Handles return values of type
Callable . |
class |
DeferredResultMethodReturnValueHandler
|
class |
HttpEntityMethodProcessor
Resolves
HttpEntity and RequestEntity method argument values
and also handles HttpEntity and ResponseEntity return values. |
class |
HttpHeadersReturnValueHandler
Handles
HttpHeaders return values. |
class |
ModelAndViewMethodReturnValueHandler
Handles return values of type
ModelAndView copying view and model
information to the ModelAndViewContainer . |
class |
ModelAndViewResolverMethodReturnValueHandler
This return value handler is intended to be ordered after all others as it
attempts to handle _any_ return value type (i.e.
|
class |
RequestResponseBodyMethodProcessor
Resolves 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 an HttpMessageConverter . |
class |
ResponseBodyEmitterReturnValueHandler
Handler for return values of type
ResponseBodyEmitter and sub-classes
such as SseEmitter including the same types wrapped with
ResponseEntity . |
class |
ServletModelAttributeMethodProcessor
A Servlet-specific
ModelAttributeMethodProcessor that applies data
binding through a WebDataBinder of type ServletRequestDataBinder . |
class |
StreamingResponseBodyReturnValueHandler
Supports return values of type
StreamingResponseBody
and also ResponseEntity<StreamingResponseBody> . |
class |
ViewMethodReturnValueHandler
Handles return values that are of type
View . |
class |
ViewNameMethodReturnValueHandler
Handles return values of types
void and String interpreting them
as view name reference. |
Modifier and Type | Method and Description |
---|---|
List<HandlerMethodReturnValueHandler> |
ExceptionHandlerExceptionResolver.getCustomReturnValueHandlers()
Return the custom return value handlers, or
null . |
List<HandlerMethodReturnValueHandler> |
RequestMappingHandlerAdapter.getCustomReturnValueHandlers()
Return the custom return value handlers, or
null . |
protected List<HandlerMethodReturnValueHandler> |
ExceptionHandlerExceptionResolver.getDefaultReturnValueHandlers()
Return the list of return value handlers to use including built-in and
custom handlers provided via
ExceptionHandlerExceptionResolver.setReturnValueHandlers(java.util.List<org.springframework.web.method.support.HandlerMethodReturnValueHandler>) . |
List<HandlerMethodReturnValueHandler> |
RequestMappingHandlerAdapter.getReturnValueHandlers()
Return the configured handlers, or possibly
null if not
initialized yet via RequestMappingHandlerAdapter.afterPropertiesSet() . |
Modifier and Type | Method and Description |
---|---|
void |
ExceptionHandlerExceptionResolver.setCustomReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers)
Provide handlers for custom return value types.
|
void |
RequestMappingHandlerAdapter.setCustomReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers)
Provide handlers for custom return value types.
|
void |
ExceptionHandlerExceptionResolver.setReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers)
Configure the complete list of supported return value types thus
overriding handlers that would otherwise be configured by default.
|
void |
RequestMappingHandlerAdapter.setReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers)
Configure the complete list of supported return value types thus
overriding handlers that would otherwise be configured by default.
|