Class ConfigurableCompositeMessageConverter
java.lang.Object
org.springframework.messaging.converter.CompositeMessageConverter
org.springframework.integration.support.converter.ConfigurableCompositeMessageConverter
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.InitializingBean
,org.springframework.messaging.converter.MessageConverter
,org.springframework.messaging.converter.SmartMessageConverter
public class ConfigurableCompositeMessageConverter
extends org.springframework.messaging.converter.CompositeMessageConverter
implements org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.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
-
Constructor Summary
Constructors Constructor Description ConfigurableCompositeMessageConverter()
Create an instance with the default converters.ConfigurableCompositeMessageConverter(java.util.Collection<org.springframework.messaging.converter.MessageConverter> converters)
Create an instance with the given converters and without defaults.ConfigurableCompositeMessageConverter(java.util.Collection<org.springframework.messaging.converter.MessageConverter> converters, boolean registerDefaults)
Create an instance with the given converters and with defaults in the end. -
Method Summary
Modifier and Type Method Description void
afterPropertiesSet()
void
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
-
Constructor Details
-
ConfigurableCompositeMessageConverter
public ConfigurableCompositeMessageConverter()Create an instance with the default converters. -
ConfigurableCompositeMessageConverter
public ConfigurableCompositeMessageConverter(java.util.Collection<org.springframework.messaging.converter.MessageConverter> converters)Create an instance with the given converters and without defaults.- Parameters:
converters
- the converters to use
-
ConfigurableCompositeMessageConverter
public ConfigurableCompositeMessageConverter(java.util.Collection<org.springframework.messaging.converter.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
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException- Specified by:
setBeanFactory
in interfaceorg.springframework.beans.factory.BeanFactoryAware
- Throws:
org.springframework.beans.BeansException
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-