Class JacksonJsonMessageConverter

java.lang.Object
org.springframework.jms.support.converter.JacksonJsonMessageConverter
All Implemented Interfaces:
Aware, BeanClassLoaderAware, MessageConverter, SmartMessageConverter

public class JacksonJsonMessageConverter extends Object implements SmartMessageConverter, BeanClassLoaderAware
Message converter that uses Jackson 3.x to convert messages to and from JSON.

Maps an object to a BytesMessage, or to a TextMessage if the targetType is set to MessageType.TEXT. Converts from a TextMessage or BytesMessage to an object.

Since:
7.0
Author:
Sebastien Deleuze
  • Field Details

    • DEFAULT_ENCODING

      public static final String DEFAULT_ENCODING
      The default encoding used for writing to text messages: UTF-8.
      See Also:
  • Constructor Details

    • JacksonJsonMessageConverter

      public JacksonJsonMessageConverter()
      Construct a new instance with a JsonMapper customized with the JacksonModules found by MapperBuilder.findModules(ClassLoader).
    • JacksonJsonMessageConverter

      public JacksonJsonMessageConverter(tools.jackson.databind.json.JsonMapper.Builder builder)
      Construct a new instance with the provided JsonMapper.Builder customized with the JacksonModules found by MapperBuilder.findModules(ClassLoader).
      See Also:
      • JsonMapper.builder()
    • JacksonJsonMessageConverter

      public JacksonJsonMessageConverter(tools.jackson.databind.json.JsonMapper mapper)
      Construct a new instance with the provided JsonMapper.
      See Also:
      • JsonMapper.builder()
  • Method Details