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:
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user