Class AlpsJsonHttpMessageConverter
java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<T>
org.springframework.http.converter.AbstractGenericHttpMessageConverter<Object>
org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter
org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
org.springframework.data.rest.webmvc.alps.AlpsJsonHttpMessageConverter
- All Implemented Interfaces:
GenericHttpMessageConverter<Object>
,HttpMessageConverter<Object>
,ResponseBodyAdvice<Object>
public class AlpsJsonHttpMessageConverter
extends MappingJackson2HttpMessageConverter
implements ResponseBodyAdvice<Object>
- Author:
- Oliver Gierke, Greg Turnquist
-
Field Summary
Fields inherited from class org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter
defaultObjectMapper
Fields inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbeforeBodyWrite
(Object body, MethodParameter returnType, MediaType selectedContentType, Class<? extends HttpMessageConverter<?>> selectedConverterType, ServerHttpRequest request, ServerHttpResponse response) boolean
boolean
boolean
boolean
supports
(MethodParameter returnType, Class<? extends HttpMessageConverter<?>> converterType) Methods inherited from class org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
getMediaTypesForProblemDetail, setJsonPrefix, setPrefixJson, writePrefix
Methods inherited from class org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter
canRead, customizeReader, customizeWriter, getCharset, getContentLength, getDefaultContentType, getJavaType, getJsonEncoding, getObjectMapper, getObjectMappersForType, getSupportedMediaTypes, logWarningIfNecessary, read, readInternal, registerObjectMappersForType, setObjectMapper, setPrettyPrint, setSupportedMediaTypes, supportsRepeatableWrites, writeInternal, writeSuffix
Methods inherited from class org.springframework.http.converter.AbstractGenericHttpMessageConverter
supports, write, writeInternal
Methods inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
addDefaultHeaders, canRead, canWrite, getDefaultCharset, getSupportedMediaTypes, read, setDefaultCharset, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.http.converter.HttpMessageConverter
getSupportedMediaTypes, read, write
-
Constructor Details
-
AlpsJsonHttpMessageConverter
Creates a newAlpsJsonHttpMessageConverter
for the givenConverter
.- Parameters:
converter
- must not be null.
-
-
Method Details
-
canWrite
- Specified by:
canWrite
in interfaceHttpMessageConverter<Object>
- Overrides:
canWrite
in classAbstractJackson2HttpMessageConverter
-
canWrite
- Specified by:
canWrite
in interfaceGenericHttpMessageConverter<Object>
- Overrides:
canWrite
in classAbstractGenericHttpMessageConverter<Object>
-
canRead
- Specified by:
canRead
in interfaceGenericHttpMessageConverter<Object>
- Overrides:
canRead
in classAbstractJackson2HttpMessageConverter
-
beforeBodyWrite
public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType, Class<? extends HttpMessageConverter<?>> selectedConverterType, ServerHttpRequest request, ServerHttpResponse response) - Specified by:
beforeBodyWrite
in interfaceResponseBodyAdvice<Object>
-
supports
public boolean supports(MethodParameter returnType, Class<? extends HttpMessageConverter<?>> converterType) - Specified by:
supports
in interfaceResponseBodyAdvice<Object>
-