Class Jackson2JsonMessageConverter
java.lang.Object
org.springframework.amqp.support.converter.AbstractMessageConverter
org.springframework.amqp.support.converter.AbstractJackson2MessageConverter
org.springframework.amqp.support.converter.Jackson2JsonMessageConverter
- All Implemented Interfaces:
MessageConverter
,SmartMessageConverter
,Aware
,BeanClassLoaderAware
JSON converter that uses the Jackson 2 Json library.
- Author:
- Mark Pollack, James Carr, Dave Syer, Sam Nelson, Andreas Asplund, Gary Russell, Artem Bilan, Arlo Louis O'Keeffe, Mohammad Hewedy
-
Field Summary
Fields inherited from class org.springframework.amqp.support.converter.AbstractJackson2MessageConverter
DEFAULT_CHARSET, log, objectMapper
-
Constructor Summary
ConstructorDescriptionConstruct with an internalObjectMapper
instance and trusted packed to all (*
).Jackson2JsonMessageConverter
(com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper) Construct with the providedObjectMapper
instance and trusted packed to all (*
).Jackson2JsonMessageConverter
(com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper, String... trustedPackages) Construct with the providedObjectMapper
instance.Jackson2JsonMessageConverter
(String... trustedPackages) Construct with an internalObjectMapper
instance. -
Method Summary
Methods inherited from class org.springframework.amqp.support.converter.AbstractJackson2MessageConverter
createMessage, createMessage, fromMessage, fromMessage, getClassLoader, getClassMapper, getDefaultCharset, getJavaTypeMapper, getSupportedContentType, getTypePrecedence, isTypeMapperSet, isUseProjectionForInterfaces, setAlwaysConvertToInferredType, setAssumeSupportedContentType, setBeanClassLoader, setClassMapper, setDefaultCharset, setJavaTypeMapper, setNullAsOptionalEmpty, setSupportedContentType, setTypePrecedence, setUseProjectionForInterfaces
Methods inherited from class org.springframework.amqp.support.converter.AbstractMessageConverter
isCreateMessageIds, setCreateMessageIds, toMessage, toMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.amqp.support.converter.MessageConverter
toMessage, toMessage
-
Constructor Details
-
Jackson2JsonMessageConverter
public Jackson2JsonMessageConverter()Construct with an internalObjectMapper
instance and trusted packed to all (*
).- Since:
- 1.6.11
- See Also:
-
Jackson2JsonMessageConverter
Construct with an internalObjectMapper
instance. TheDeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES
is set to false on theObjectMapper
.- Parameters:
trustedPackages
- the trusted Java packages for deserialization- Since:
- 1.6.11
- See Also:
-
Jackson2JsonMessageConverter
public Jackson2JsonMessageConverter(com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper) Construct with the providedObjectMapper
instance and trusted packed to all (*
).- Parameters:
jsonObjectMapper
- theObjectMapper
to use.- Since:
- 1.6.12
-
Jackson2JsonMessageConverter
public Jackson2JsonMessageConverter(com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper, String... trustedPackages) Construct with the providedObjectMapper
instance.- Parameters:
jsonObjectMapper
- theObjectMapper
to use.trustedPackages
- the trusted Java packages for deserialization- Since:
- 1.6.11
- See Also:
-