Class ConfigurableCompositeMessageConverter
java.lang.Object
org.springframework.messaging.converter.CompositeMessageConverter
org.springframework.integration.support.converter.ConfigurableCompositeMessageConverter
- All Implemented Interfaces:
Aware
,BeanFactoryAware
,InitializingBean
,MessageConverter
,SmartMessageConverter
public class ConfigurableCompositeMessageConverter
extends CompositeMessageConverter
implements BeanFactoryAware, InitializingBean
A
CompositeMessageConverter
extension with some default MessageConverter
s
which can be overridden with the given converters
or added in the end of target converters
collection.
The default converts are (declared exactly in this order):
-
MappingJackson2MessageConverter
if Jackson processor is present in classpath; -
ByteArrayMessageConverter
-
ObjectStringMessageConverter
-
GenericMessageConverter
- Since:
- 5.0
- Author:
- Artem Bilan
-
Constructor Summary
ConstructorDescriptionCreate an instance with the default converters.Create an instance with the given converters and without defaults.ConfigurableCompositeMessageConverter
(Collection<MessageConverter> converters, boolean registerDefaults) Create an instance with the given converters and with defaults in the end. -
Method Summary
Methods inherited from class org.springframework.messaging.converter.CompositeMessageConverter
fromMessage, fromMessage, getConverters, toMessage, toMessage, toString
-
Constructor Details
-
ConfigurableCompositeMessageConverter
public ConfigurableCompositeMessageConverter()Create an instance with the default converters. -
ConfigurableCompositeMessageConverter
Create an instance with the given converters and without defaults.- Parameters:
converters
- the converters to use
-
ConfigurableCompositeMessageConverter
public ConfigurableCompositeMessageConverter(Collection<MessageConverter> converters, boolean registerDefaults) Create an instance with the given converters and with defaults in the end.- Parameters:
converters
- the converters to useregisterDefaults
- register or not default converts
-
-
Method Details
-
setBeanFactory
- Specified by:
setBeanFactory
in interfaceBeanFactoryAware
- Throws:
BeansException
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceInitializingBean
-