BeanDefinitions: Mix instanceSupplier and props

This commit is contained in:
Artem Bilan
2021-10-08 14:45:34 -04:00
parent 7d29cf7f02
commit ee8afc5b28
18 changed files with 349 additions and 564 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 the original author or authors.
* Copyright 2016-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,6 +31,7 @@ import org.springframework.integration.scripting.config.ScriptExecutingProcessor
* The Groovy Module Integration infrastructure {@code beanFactory} initializer.
*
* @author Artem Bilan
*
* @since 5.0
*/
public class GroovyIntegrationConfigurationInitializer implements IntegrationConfigurationInitializer {
@@ -51,7 +52,8 @@ public class GroovyIntegrationConfigurationInitializer implements IntegrationCon
protected void registerScriptExecutorProviderIfNecessary(BeanDefinitionRegistry registry) {
if (!registry.containsBeanDefinition(ScriptExecutingProcessorFactory.BEAN_NAME)) {
registry.registerBeanDefinition(ScriptExecutingProcessorFactory.BEAN_NAME,
new RootBeanDefinition(GroovyAwareScriptExecutingProcessorFactory.class));
new RootBeanDefinition(GroovyAwareScriptExecutingProcessorFactory.class,
GroovyAwareScriptExecutingProcessorFactory::new));
}
}