Class MappingJacksonParameterizedConverter

  • All Implemented Interfaces:
    org.springframework.messaging.converter.MessageConverter, org.springframework.messaging.converter.SmartMessageConverter

    public class MappingJacksonParameterizedConverter
    extends org.springframework.messaging.converter.MappingJackson2MessageConverter
    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

      Constructors 
      Constructor Description
      MappingJacksonParameterizedConverter()
      Construct a MappingJacksonParameterizedConverter supporting the application/json MIME type with UTF-8 character set.
      MappingJacksonParameterizedConverter​(org.springframework.util.MimeType... supportedMimeTypes)
      Construct a MappingJacksonParameterizedConverter 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MappingJacksonParameterizedConverter

        public MappingJacksonParameterizedConverter()
        Construct a MappingJacksonParameterizedConverter supporting the application/json MIME type with UTF-8 character set.
      • MappingJacksonParameterizedConverter

        public MappingJacksonParameterizedConverter​(org.springframework.util.MimeType... supportedMimeTypes)
        Construct a MappingJacksonParameterizedConverter supporting one or more custom MIME types.
        Parameters:
        supportedMimeTypes - the supported MIME types
    • Method Detail

      • 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 class org.springframework.messaging.converter.MappingJackson2MessageConverter