GH-3953: Use lazy-load for output channels
Fixes https://github.com/spring-projects/spring-integration/issues/3953 The replying `MessageHandler` can resolve the target output channel in on-demand manner. A new messaging annotations on `@Bean` parsing algorithm is missing the lazy-load opportunity and uses a `RuntimeBeanReference` for output channel options loading its bean eagerly. * Fix `AbstractMethodAnnotationPostProcessor` to use a `outputChannelName` and `defaultOutputChannelName` target properties for channel names to set.
This commit is contained in:
@@ -211,8 +211,8 @@ public abstract class AbstractMethodAnnotationPostProcessor<T extends Annotation
|
||||
|
||||
new BeanDefinitionPropertiesMapper(handlerBeanDefinition, annotations)
|
||||
.setPropertyValue(SEND_TIMEOUT_ATTRIBUTE)
|
||||
.setPropertyReference("outputChannel")
|
||||
.setPropertyReference("defaultOutputChannel");
|
||||
.setPropertyValue("outputChannel", "outputChannelName")
|
||||
.setPropertyValue("defaultOutputChannel", "defaultOutputChannelName");
|
||||
}
|
||||
|
||||
if (isClassIn(handlerBeanClass, AbstractMessageProducingHandler.class,
|
||||
|
||||
Reference in New Issue
Block a user