INT-4485: Don't register bean twice for DSL Specs
JIRA: https://jira.spring.io/browse/INT-4485 The `IntegrationFlowBeanPostProcessor` performs extra bean registration for the `IntegrationComponentSpec.get()` result. Essentially it is going to be the same object in the end, but during bean registration phase we end up with names conflict. * Remove an explicit `registerComponent()` for the `IntegrationComponentSpec.get()` * Modify `CorrelationHandlerTests` for all possible usage for the `MessageChannelSpec`, which is essentially a `FactoryBean` **Cherry-pick to 5.0.x**
This commit is contained in:
committed by
Gary Russell
parent
85bc183849
commit
da53ed6838
@@ -309,7 +309,6 @@ public class IntegrationFlowBeanPostProcessor
|
||||
}
|
||||
|
||||
private void processIntegrationComponentSpec(IntegrationComponentSpec<?, ?> bean) {
|
||||
registerComponent(bean.get(), generateBeanName(bean.get(), bean.getId()));
|
||||
if (bean instanceof ComponentsRegistration) {
|
||||
Map<Object, String> componentsToRegister = ((ComponentsRegistration) bean).getComponentsToRegister();
|
||||
if (!CollectionUtils.isEmpty(componentsToRegister)) {
|
||||
|
||||
Reference in New Issue
Block a user