Class MappingJacksonParameterizedConverter
- java.lang.Object
-
- org.springframework.messaging.converter.AbstractMessageConverter
-
- org.springframework.messaging.converter.MappingJackson2MessageConverter
-
- org.springframework.kafka.support.converter.MappingJacksonParameterizedConverter
-
- All Implemented Interfaces:
org.springframework.messaging.converter.MessageConverter
,org.springframework.messaging.converter.SmartMessageConverter
public class MappingJacksonParameterizedConverter extends org.springframework.messaging.converter.MappingJackson2MessageConverter
Subclass ofMappingJackson2MessageConverter
that can handle parameterized (generic) types.- Since:
- 2.7.1
- Author:
- Gary Russell
-
-
Constructor Summary
Constructors Constructor Description MappingJacksonParameterizedConverter()
Construct aMappingJacksonParameterizedConverter
supporting theapplication/json
MIME type withUTF-8
character set.MappingJacksonParameterizedConverter(org.springframework.util.MimeType... supportedMimeTypes)
Construct aMappingJacksonParameterizedConverter
supporting one or more custom MIME types.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
convertFromInternal(org.springframework.messaging.Message<?> message, java.lang.Class<?> targetClass, java.lang.Object conversionHint)
Jackson2JavaTypeMapper
getTypeMapper()
Return the type mapper.void
setTypeMapper(Jackson2JavaTypeMapper typeMapper)
Set a customized type mapper.-
Methods inherited from class org.springframework.messaging.converter.MappingJackson2MessageConverter
canConvertFrom, canConvertTo, convertToInternal, getJsonEncoding, getObjectMapper, getSerializationView, logWarningIfNecessary, setObjectMapper, setPrettyPrint, supports
-
Methods inherited from class org.springframework.messaging.converter.AbstractMessageConverter
addSupportedMimeTypes, fromMessage, fromMessage, getContentTypeResolver, getDefaultContentType, getMimeType, getSerializedPayloadClass, getSupportedMimeTypes, isStrictContentTypeMatch, setContentTypeResolver, setSerializedPayloadClass, setStrictContentTypeMatch, supportsMimeType, toMessage, toMessage
-
-
-
-
Constructor Detail
-
MappingJacksonParameterizedConverter
public MappingJacksonParameterizedConverter()
Construct aMappingJacksonParameterizedConverter
supporting theapplication/json
MIME type withUTF-8
character set.
-
MappingJacksonParameterizedConverter
public MappingJacksonParameterizedConverter(org.springframework.util.MimeType... supportedMimeTypes)
Construct aMappingJacksonParameterizedConverter
supporting one or more custom MIME types.- Parameters:
supportedMimeTypes
- the supported MIME types
-
-
Method Detail
-
getTypeMapper
public Jackson2JavaTypeMapper getTypeMapper()
Return the type mapper.- Returns:
- the mapper.
-
setTypeMapper
public void setTypeMapper(Jackson2JavaTypeMapper typeMapper)
Set a customized type mapper.- Parameters:
typeMapper
- the type mapper.
-
convertFromInternal
@Nullable protected java.lang.Object convertFromInternal(org.springframework.messaging.Message<?> message, java.lang.Class<?> targetClass, @Nullable java.lang.Object conversionHint)
- Overrides:
convertFromInternal
in classorg.springframework.messaging.converter.MappingJackson2MessageConverter
-
-