Class MappingJacksonParameterizedConverter
java.lang.Object
org.springframework.messaging.converter.AbstractMessageConverter
org.springframework.messaging.converter.MappingJackson2MessageConverter
org.springframework.kafka.support.converter.MappingJacksonParameterizedConverter
- All Implemented Interfaces:
MessageConverter
,SmartMessageConverter
Subclass of
MappingJackson2MessageConverter
that can handle parameterized
(generic) types.- Since:
- 2.7.1
- Author:
- Gary Russell
-
Field Summary
Fields inherited from class org.springframework.messaging.converter.AbstractMessageConverter
logger
-
Constructor Summary
ConstructorDescriptionConstruct aMappingJacksonParameterizedConverter
supporting theapplication/json
MIME type withUTF-8
character set.MappingJacksonParameterizedConverter
(MimeType... supportedMimeTypes) Construct aMappingJacksonParameterizedConverter
supporting one or more custom MIME types. -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
convertFromInternal
(Message<?> message, Class<?> targetClass, Object conversionHint) 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 Details
-
MappingJacksonParameterizedConverter
public MappingJacksonParameterizedConverter()Construct aMappingJacksonParameterizedConverter
supporting theapplication/json
MIME type withUTF-8
character set. -
MappingJacksonParameterizedConverter
Construct aMappingJacksonParameterizedConverter
supporting one or more custom MIME types.- Parameters:
supportedMimeTypes
- the supported MIME types
-
-
Method Details
-
getTypeMapper
Return the type mapper.- Returns:
- the mapper.
-
setTypeMapper
Set a customized type mapper.- Parameters:
typeMapper
- the type mapper.
-
convertFromInternal
@Nullable protected Object convertFromInternal(Message<?> message, Class<?> targetClass, @Nullable Object conversionHint) - Overrides:
convertFromInternal
in classMappingJackson2MessageConverter
-