diff --git a/core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/DefaultBinderFactory.java b/core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/DefaultBinderFactory.java index 0b8f08bda..99d82a376 100644 --- a/core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/DefaultBinderFactory.java +++ b/core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/DefaultBinderFactory.java @@ -494,10 +494,10 @@ public void onApplicationEvent(ApplicationEvent event) { } if (refresh) { - binderProducingContext.refresh(); if (!useApplicationContextAsParent || "integration".equals(binderType.getDefaultName())) { this.propagateSharedBeans(binderProducingContext, (GenericApplicationContext) this.context); } + binderProducingContext.refresh(); } return binderProducingContext;