GH-1865 Remove unecessary creation of function initializer

Togethere with a2dc34a160 commit this should
address the issues where functions are being bootstrapped when annotation-based configuration is present

Resolves #1865
This commit is contained in:
Oleg Zhurakousky
2019-12-09 14:13:59 +01:00
parent 355cb0c4f1
commit b6f3bfbb53

View File

@@ -129,12 +129,15 @@ public class FunctionConfiguration {
BindingServiceProperties serviceProperties, ConfigurableApplicationContext applicationContext,
FunctionBindingRegistrar bindingHolder, BinderAwareChannelResolver dynamicDestinationResolver) {
if (bindableProxyFactories == null) {
return null;
}
boolean shouldCreateInitializer = bindableProxyFactories != null
&& (applicationContext.containsBean("output")
|| ObjectUtils.isEmpty(applicationContext.getBeanNamesForAnnotation(EnableBinding.class)));
return shouldCreateInitializer
? new FunctionChannelBindingInitializer(functionCatalog, functionProperties, bindableProxyFactories,
serviceProperties, dynamicDestinationResolver)
: null;
return new FunctionChannelBindingInitializer(functionCatalog, functionProperties, bindableProxyFactories,
serviceProperties, dynamicDestinationResolver);
}
/*