Package | Description |
---|---|
org.springframework.http.converter |
Provides an HttpMessageConverter abstraction to convert between Java objects and HTTP input/output messages.
|
org.springframework.http.converter.cbor |
Provides an HttpMessageConverter for the CBOR data format.
|
org.springframework.http.converter.feed |
Provides HttpMessageConverter implementations for handling Atom and RSS feeds.
|
org.springframework.http.converter.json |
Provides HttpMessageConverter implementations for handling JSON.
|
org.springframework.http.converter.protobuf |
Provides an HttpMessageConverter implementation for handling
Google Protocol Buffers.
|
org.springframework.http.converter.smile |
Provides an HttpMessageConverter for the Smile data format ("binary JSON").
|
org.springframework.http.converter.support |
Provides a comprehensive HttpMessageConverter variant for form handling.
|
org.springframework.http.converter.xml |
Provides HttpMessageConverter implementations for handling XML.
|
org.springframework.test.web.servlet.setup |
Contains built-in
MockMvcBuilder implementations. |
org.springframework.web.client |
Core package of the client-side web support.
|
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 | Interface and Description |
---|---|
interface |
GenericHttpMessageConverter<T>
A specialization of
HttpMessageConverter that can convert an HTTP request
into a target object of a specified generic type and a source object of a specified
generic type into an HTTP response. |
Modifier and Type | Class and Description |
---|---|
class |
AbstractGenericHttpMessageConverter<T>
Abstract base class for most
GenericHttpMessageConverter implementations. |
class |
AbstractHttpMessageConverter<T>
Abstract base class for most
HttpMessageConverter implementations. |
class |
BufferedImageHttpMessageConverter
Implementation of
HttpMessageConverter that can read and write
BufferedImages . |
class |
ByteArrayHttpMessageConverter
Implementation of
HttpMessageConverter that can read and write byte arrays. |
class |
FormHttpMessageConverter
Implementation of
HttpMessageConverter to read and write 'normal' HTML
forms and also to write (but not read) multipart data (e.g. |
class |
ObjectToStringHttpMessageConverter
An
HttpMessageConverter that uses StringHttpMessageConverter
for reading and writing content and a ConversionService for converting
the String content to and from the target object type. |
class |
ResourceHttpMessageConverter
Implementation of
HttpMessageConverter that can read/write Resources
and supports byte range requests. |
class |
ResourceRegionHttpMessageConverter
Implementation of
HttpMessageConverter that can write a single ResourceRegion ,
or Collections of ResourceRegions . |
class |
StringHttpMessageConverter
Implementation of
HttpMessageConverter that can read and write strings. |
Modifier and Type | Method and Description |
---|---|
void |
FormHttpMessageConverter.addPartConverter(HttpMessageConverter<?> partConverter)
Add a message body converter.
|
Modifier and Type | Method and Description |
---|---|
void |
FormHttpMessageConverter.setPartConverters(java.util.List<HttpMessageConverter<?>> partConverters)
Set the message body converters to use.
|
Modifier and Type | Class and Description |
---|---|
class |
MappingJackson2CborHttpMessageConverter
Implementation of
HttpMessageConverter
that can read and write CBOR data format using
the dedicated Jackson 2.x extension. |
Modifier and Type | Class and Description |
---|---|
class |
AbstractWireFeedHttpMessageConverter<T extends com.rometools.rome.feed.WireFeed>
Abstract base class for Atom and RSS Feed message converters, using the
ROME tools project.
|
class |
AtomFeedHttpMessageConverter
Implementation of
HttpMessageConverter
that can read and write Atom feeds. |
class |
RssChannelHttpMessageConverter
Implementation of
HttpMessageConverter
that can read and write RSS feeds. |
Modifier and Type | Class and Description |
---|---|
class |
AbstractJackson2HttpMessageConverter
Abstract base class for Jackson based and content type independent
HttpMessageConverter implementations. |
class |
AbstractJsonHttpMessageConverter
Common base class for plain JSON converters, e.g.
|
class |
GsonHttpMessageConverter
Implementation of
HttpMessageConverter
that can read and write JSON using the
Google Gson library. |
class |
JsonbHttpMessageConverter
Implementation of
HttpMessageConverter
that can read and write JSON using the
JSON Binding API. |
class |
MappingJackson2HttpMessageConverter
Implementation of
HttpMessageConverter that can read and
write JSON using Jackson 2.x's ObjectMapper . |
Modifier and Type | Class and Description |
---|---|
class |
ProtobufHttpMessageConverter
An
HttpMessageConverter that reads and writes
com.google.protobuf.Messages using
Google Protocol Buffers. |
class |
ProtobufJsonFormatHttpMessageConverter
Subclass of
ProtobufHttpMessageConverter which enforces the use of Protobuf 3 and
its official library "com.google.protobuf:protobuf-java-util" for JSON processing. |
Modifier and Type | Class and Description |
---|---|
class |
MappingJackson2SmileHttpMessageConverter
Implementation of
HttpMessageConverter
that can read and write Smile data format ("binary JSON") using
the dedicated Jackson 2.x extension. |
Modifier and Type | Class and Description |
---|---|
class |
AllEncompassingFormHttpMessageConverter
Extension of
FormHttpMessageConverter ,
adding support for XML and JSON-based parts. |
Modifier and Type | Class and Description |
---|---|
class |
AbstractJaxb2HttpMessageConverter<T>
Abstract base class for
HttpMessageConverters
that use JAXB2. |
class |
AbstractXmlHttpMessageConverter<T>
Abstract base class for
HttpMessageConverters
that convert from/to XML. |
class |
Jaxb2CollectionHttpMessageConverter<T extends java.util.Collection>
An
HttpMessageConverter that can read XML collections using JAXB2. |
class |
Jaxb2RootElementHttpMessageConverter
Implementation of
HttpMessageConverter that can read and write XML using JAXB2. |
class |
MappingJackson2XmlHttpMessageConverter
Implementation of
HttpMessageConverter
that can read and write XML using
Jackson 2.x extension component for reading and writing XML encoded data. |
class |
MarshallingHttpMessageConverter
Implementation of
HttpMessageConverter
that can read and write XML using Spring's Marshaller and Unmarshaller abstractions. |
class |
SourceHttpMessageConverter<T extends javax.xml.transform.Source>
Implementation of
HttpMessageConverter
that can read and write Source objects. |
Modifier and Type | Method and Description |
---|---|
StandaloneMockMvcBuilder |
StandaloneMockMvcBuilder.setMessageConverters(HttpMessageConverter<?>... messageConverters)
Set the message converters to use in argument resolvers and in return value
handlers, which support reading and/or writing to the body of the request
and response.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<HttpMessageConverter<?>> |
RestTemplate.getMessageConverters()
Return the list of message body converters.
|
java.util.List<HttpMessageConverter<?>> |
AsyncRestTemplate.getMessageConverters()
Deprecated.
Return the message body converters.
|
Modifier and Type | Method and Description |
---|---|
void |
RestTemplate.setMessageConverters(java.util.List<HttpMessageConverter<?>> messageConverters)
Set the message body converters to use.
|
void |
ExtractingResponseErrorHandler.setMessageConverters(java.util.List<HttpMessageConverter<?>> messageConverters)
Set the message converters to use by this extractor.
|
void |
AsyncRestTemplate.setMessageConverters(java.util.List<HttpMessageConverter<?>> messageConverters)
Deprecated.
Set the message body converters to use.
|
Constructor and Description |
---|
ExtractingResponseErrorHandler(java.util.List<HttpMessageConverter<?>> messageConverters)
Create a new
ExtractingResponseErrorHandler with the given
HttpMessageConverter instances. |
HttpMessageConverterExtractor(java.lang.Class<T> responseType,
java.util.List<HttpMessageConverter<?>> messageConverters)
Create a new instance of the
HttpMessageConverterExtractor with the given response
type and message converters. |
HttpMessageConverterExtractor(java.lang.reflect.Type responseType,
java.util.List<HttpMessageConverter<?>> messageConverters)
Creates a new instance of the
HttpMessageConverterExtractor with the given response
type and message converters. |
RestTemplate(java.util.List<HttpMessageConverter<?>> messageConverters)
Create a new instance of the
RestTemplate using the given list of
HttpMessageConverter to use. |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<HttpMessageConverter<?>> |
WebMvcConfigurationSupport.getMessageConverters()
Provides access to the shared
HttpMessageConverters
used by the RequestMappingHandlerAdapter and the
ExceptionHandlerExceptionResolver . |
Modifier and Type | Method and Description |
---|---|
protected void |
WebMvcConfigurationSupport.addDefaultHttpMessageConverters(java.util.List<HttpMessageConverter<?>> messageConverters)
Adds a set of default HttpMessageConverter instances to the given list.
|
void |
WebMvcConfigurerAdapter.configureMessageConverters(java.util.List<HttpMessageConverter<?>> converters)
Deprecated.
Configure the
HttpMessageConverters to use for reading or writing
to the body of the request or response. |
protected void |
DelegatingWebMvcConfiguration.configureMessageConverters(java.util.List<HttpMessageConverter<?>> converters) |
default void |
WebMvcConfigurer.configureMessageConverters(java.util.List<HttpMessageConverter<?>> converters)
Configure the
HttpMessageConverters to use for reading or writing
to the body of the request or response. |
protected void |
WebMvcConfigurationSupport.configureMessageConverters(java.util.List<HttpMessageConverter<?>> converters)
Override this method to add custom
HttpMessageConverters
to use with the RequestMappingHandlerAdapter and the
ExceptionHandlerExceptionResolver . |
void |
WebMvcConfigurerAdapter.extendMessageConverters(java.util.List<HttpMessageConverter<?>> converters)
Deprecated.
A hook for extending or modifying the list of converters after it has been
configured.
|
protected void |
DelegatingWebMvcConfiguration.extendMessageConverters(java.util.List<HttpMessageConverter<?>> converters) |
default void |
WebMvcConfigurer.extendMessageConverters(java.util.List<HttpMessageConverter<?>> converters)
A hook for extending or modifying the list of converters after it has been
configured.
|
protected void |
WebMvcConfigurationSupport.extendMessageConverters(java.util.List<HttpMessageConverter<?>> converters)
Override this method to extend or modify the list of converters after it has
been configured.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.List<HttpMessageConverter<?>> |
AbstractMessageConverterMethodArgumentResolver.messageConverters |
Modifier and Type | Method and Description |
---|---|
java.util.List<HttpMessageConverter<?>> |
ExceptionHandlerExceptionResolver.getMessageConverters()
Return the configured message body converters.
|
java.util.List<HttpMessageConverter<?>> |
RequestMappingHandlerAdapter.getMessageConverters()
Return the configured message body converters.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
RequestBodyAdvice.afterBodyRead(java.lang.Object body,
HttpInputMessage inputMessage,
MethodParameter parameter,
java.lang.reflect.Type targetType,
java.lang.Class<? extends HttpMessageConverter<?>> converterType)
Invoked third (and last) after the request body is converted to an Object.
|
java.lang.Object |
RequestBodyAdviceAdapter.afterBodyRead(java.lang.Object body,
HttpInputMessage inputMessage,
MethodParameter parameter,
java.lang.reflect.Type targetType,
java.lang.Class<? extends HttpMessageConverter<?>> converterType)
The default implementation returns the body that was passed in.
|
HttpInputMessage |
RequestBodyAdvice.beforeBodyRead(HttpInputMessage inputMessage,
MethodParameter parameter,
java.lang.reflect.Type targetType,
java.lang.Class<? extends HttpMessageConverter<?>> converterType)
Invoked second before the request body is read and converted.
|
HttpInputMessage |
JsonViewRequestBodyAdvice.beforeBodyRead(HttpInputMessage inputMessage,
MethodParameter methodParameter,
java.lang.reflect.Type targetType,
java.lang.Class<? extends HttpMessageConverter<?>> selectedConverterType) |
HttpInputMessage |
RequestBodyAdviceAdapter.beforeBodyRead(HttpInputMessage inputMessage,
MethodParameter parameter,
java.lang.reflect.Type targetType,
java.lang.Class<? extends HttpMessageConverter<?>> converterType)
The default implementation returns the InputMessage that was passed in.
|
java.lang.Object |
AbstractMappingJacksonResponseBodyAdvice.beforeBodyWrite(java.lang.Object body,
MethodParameter returnType,
MediaType contentType,
java.lang.Class<? extends HttpMessageConverter<?>> converterType,
ServerHttpRequest request,
ServerHttpResponse response) |
T |
ResponseBodyAdvice.beforeBodyWrite(T body,
MethodParameter returnType,
MediaType selectedContentType,
java.lang.Class<? extends HttpMessageConverter<?>> selectedConverterType,
ServerHttpRequest request,
ServerHttpResponse response)
Invoked after an
HttpMessageConverter is selected and just before
its write method is invoked. |
java.lang.Object |
RequestBodyAdvice.handleEmptyBody(java.lang.Object body,
HttpInputMessage inputMessage,
MethodParameter parameter,
java.lang.reflect.Type targetType,
java.lang.Class<? extends HttpMessageConverter<?>> converterType)
Invoked second (and last) if the body is empty.
|
java.lang.Object |
RequestBodyAdviceAdapter.handleEmptyBody(java.lang.Object body,
HttpInputMessage inputMessage,
MethodParameter parameter,
java.lang.reflect.Type targetType,
java.lang.Class<? extends HttpMessageConverter<?>> converterType)
The default implementation returns the body that was passed in.
|
void |
ExceptionHandlerExceptionResolver.setMessageConverters(java.util.List<HttpMessageConverter<?>> messageConverters)
Set the message body converters to use.
|
void |
RequestMappingHandlerAdapter.setMessageConverters(java.util.List<HttpMessageConverter<?>> messageConverters)
Provide the converters to use in argument resolvers and return value
handlers that support reading and/or writing to the body of the
request and response.
|
boolean |
JsonViewResponseBodyAdvice.supports(MethodParameter returnType,
java.lang.Class<? extends HttpMessageConverter<?>> converterType) |
boolean |
ResponseBodyAdvice.supports(MethodParameter returnType,
java.lang.Class<? extends HttpMessageConverter<?>> converterType)
Whether this component supports the given controller method return type
and the selected
HttpMessageConverter type. |
boolean |
AbstractMappingJacksonResponseBodyAdvice.supports(MethodParameter returnType,
java.lang.Class<? extends HttpMessageConverter<?>> converterType) |
boolean |
RequestBodyAdvice.supports(MethodParameter methodParameter,
java.lang.reflect.Type targetType,
java.lang.Class<? extends HttpMessageConverter<?>> converterType)
Invoked first to determine if this interceptor applies.
|
boolean |
JsonViewRequestBodyAdvice.supports(MethodParameter methodParameter,
java.lang.reflect.Type targetType,
java.lang.Class<? extends HttpMessageConverter<?>> converterType) |
Constructor and Description |
---|
AbstractMessageConverterMethodArgumentResolver(java.util.List<HttpMessageConverter<?>> converters)
Basic constructor with converters only.
|
AbstractMessageConverterMethodArgumentResolver(java.util.List<HttpMessageConverter<?>> converters,
java.util.List<java.lang.Object> requestResponseBodyAdvice)
Constructor with converters and
Request~ and ResponseBodyAdvice . |
AbstractMessageConverterMethodProcessor(java.util.List<HttpMessageConverter<?>> converters)
Constructor with list of converters only.
|
AbstractMessageConverterMethodProcessor(java.util.List<HttpMessageConverter<?>> converters,
ContentNegotiationManager contentNegotiationManager)
Constructor with list of converters and ContentNegotiationManager.
|
AbstractMessageConverterMethodProcessor(java.util.List<HttpMessageConverter<?>> converters,
ContentNegotiationManager manager,
java.util.List<java.lang.Object> requestResponseBodyAdvice)
Constructor with list of converters and ContentNegotiationManager as well
as request/response body advice instances.
|
HttpEntityMethodProcessor(java.util.List<HttpMessageConverter<?>> converters)
Basic constructor with converters only.
|
HttpEntityMethodProcessor(java.util.List<HttpMessageConverter<?>> converters,
ContentNegotiationManager manager)
Basic constructor with converters and
ContentNegotiationManager . |
HttpEntityMethodProcessor(java.util.List<HttpMessageConverter<?>> converters,
ContentNegotiationManager manager,
java.util.List<java.lang.Object> requestResponseBodyAdvice)
Complete constructor for resolving
HttpEntity and handling
ResponseEntity . |
HttpEntityMethodProcessor(java.util.List<HttpMessageConverter<?>> converters,
java.util.List<java.lang.Object> requestResponseBodyAdvice)
Complete constructor for resolving
HttpEntity method arguments. |
RequestPartMethodArgumentResolver(java.util.List<HttpMessageConverter<?>> messageConverters)
Basic constructor with converters only.
|
RequestPartMethodArgumentResolver(java.util.List<HttpMessageConverter<?>> messageConverters,
java.util.List<java.lang.Object> requestResponseBodyAdvice)
Constructor with converters and
Request~ and
ResponseBodyAdvice . |
RequestResponseBodyMethodProcessor(java.util.List<HttpMessageConverter<?>> converters)
Basic constructor with converters only.
|
RequestResponseBodyMethodProcessor(java.util.List<HttpMessageConverter<?>> converters,
ContentNegotiationManager manager)
Basic constructor with converters and
ContentNegotiationManager . |
RequestResponseBodyMethodProcessor(java.util.List<HttpMessageConverter<?>> converters,
ContentNegotiationManager manager,
java.util.List<java.lang.Object> requestResponseBodyAdvice)
Complete constructor for resolving
@RequestBody and handling
@ResponseBody . |
RequestResponseBodyMethodProcessor(java.util.List<HttpMessageConverter<?>> converters,
java.util.List<java.lang.Object> requestResponseBodyAdvice)
Complete constructor for resolving
@RequestBody method arguments. |
ResponseBodyEmitterReturnValueHandler(java.util.List<HttpMessageConverter<?>> messageConverters)
Simple constructor with reactive type support based on a default instance of
ReactiveAdapterRegistry ,
SyncTaskExecutor , and
ContentNegotiationManager with an Accept header strategy. |
ResponseBodyEmitterReturnValueHandler(java.util.List<HttpMessageConverter<?>> messageConverters,
ReactiveAdapterRegistry reactiveRegistry,
TaskExecutor executor,
ContentNegotiationManager manager)
Complete constructor with pluggable "reactive" type support.
|