Binder instantiation changes
- When default binder is provided, consider it while instantiating the binder. This is needed for AOT/Native applications that provide a default binder. Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2569 Resolves #2579
This commit is contained in:
committed by
Oleg Zhurakousky
parent
474ee07086
commit
13399dcd5f
@@ -163,7 +163,7 @@ public class DefaultBinderFactory implements BinderFactory, DisposableBean, Appl
|
||||
return this.doGetBinderConventional(name, bindingTargetType);
|
||||
}
|
||||
else {
|
||||
if (!StringUtils.hasText(name) && this.binderChildContextInitializers.size() == 1) {
|
||||
if ((!StringUtils.hasText(name) || this.defaultBinder != null) && this.binderChildContextInitializers.size() == 1) {
|
||||
String configurationName = this.binderChildContextInitializers.keySet().iterator().next();
|
||||
return this.getBinderInstance(configurationName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user