Fix producer Binding#companion bean not set

This commit is contained in:
Atsushi Yoshikawa
2022-10-25 23:52:19 +09:00
committed by Oleg Zhurakousky
parent b125603266
commit 384ba2a8f8

View File

@@ -303,7 +303,8 @@ public abstract class AbstractMessageChannelBinder<C extends ConsumerProperties,
};
Lifecycle companion = null;
String companionLifecycleName = destination + "_spca";
String outputChannelName = ((AbstractMessageChannel) outputChannel).getBeanName();
String companionLifecycleName = outputChannelName + "_spca";
if (this.getApplicationContext().containsBean(companionLifecycleName)) {
companion = this.getApplicationContext().getBean(companionLifecycleName, Lifecycle.class);
}