GH-2806: Pulsar binder defaults properties config

- Ensure that the Pulsar binder default properties can be properly
   expressed via spring.cloud.stream.pulsar.default property prefix.
 - Add the binder child context bean with the name binderName_binderProducingContext
   into the parent application context so that individual beans from the binder context
   can be easily queried.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2806
This commit is contained in:
Soby Chacko
2023-09-18 13:20:05 -04:00
committed by Chris Bono
parent e06d4eedfd
commit 34aae4b62d
4 changed files with 167 additions and 0 deletions

View File

@@ -482,6 +482,10 @@ public class DefaultBinderFactory implements BinderFactory, DisposableBean, Appl
if (refresh) {
binderProducingContext.refresh();
if (this.context != null) {
this.context.getBeanFactory().registerSingleton(configurationName + "_binderProducingContext",
binderProducingContext);
}
if (!useApplicationContextAsParent || "integration".equals(binderType.getDefaultName())) {
this.propagateSharedBeans((GenericApplicationContext) this.context, binderProducingContext);
}