public class ProjectingJackson2HttpMessageConverter extends MappingJackson2HttpMessageConverter implements BeanClassLoaderAware, BeanFactoryAware
HttpMessageConverter implementation to enable projected JSON binding to interfaces annotated with
ProjectedPayload.DEFAULT_CHARSET, objectMapperlogger| Constructor and Description |
|---|
ProjectingJackson2HttpMessageConverter()
Creates a new
ProjectingJackson2HttpMessageConverter using a default ObjectMapper. |
ProjectingJackson2HttpMessageConverter(com.fasterxml.jackson.databind.ObjectMapper mapper)
Creates a new
ProjectingJackson2HttpMessageConverter for the given ObjectMapper. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(Type type,
Class<?> contextClass,
MediaType mediaType) |
boolean |
canWrite(Class<?> clazz,
MediaType mediaType) |
Object |
read(Type type,
Class<?> contextClass,
HttpInputMessage inputMessage) |
void |
setBeanClassLoader(ClassLoader classLoader) |
void |
setBeanFactory(BeanFactory beanFactory) |
setJsonPrefix, setPrefixJson, writePrefixcanRead, getCharset, getContentLength, getDefaultContentType, getJavaType, getJsonEncoding, getObjectMapper, logWarningIfNecessary, readInternal, setObjectMapper, setPrettyPrint, writeInternal, writeSuffixcanWrite, supports, write, writeInternaladdDefaultHeaders, canRead, canWrite, getDefaultCharset, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, writeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSupportedMediaTypes, read, writepublic ProjectingJackson2HttpMessageConverter()
ProjectingJackson2HttpMessageConverter using a default ObjectMapper.public ProjectingJackson2HttpMessageConverter(com.fasterxml.jackson.databind.ObjectMapper mapper)
ProjectingJackson2HttpMessageConverter for the given ObjectMapper.mapper - must not be null.public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader in interface BeanClassLoaderAwarepublic void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory in interface BeanFactoryAwareBeansExceptionpublic boolean canRead(Type type, @Nullable Class<?> contextClass, @Nullable MediaType mediaType)
canRead in interface GenericHttpMessageConverter<Object>canRead in class AbstractJackson2HttpMessageConverterpublic boolean canWrite(Class<?> clazz, @Nullable MediaType mediaType)
canWrite in interface HttpMessageConverter<Object>canWrite in class AbstractJackson2HttpMessageConverterpublic Object read(Type type, @Nullable Class<?> contextClass, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException
read in interface GenericHttpMessageConverter<Object>read in class AbstractJackson2HttpMessageConverterIOExceptionHttpMessageNotReadableExceptionCopyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.