INT-4252 IntegrationFlow: Allow Custom Bean Names
JIRA: https://jira.spring.io/browse/INT-4252 To allow to provide arbitrary bean names for the intermediate components in the `IntegrationFlow` change `ComponentsRegistration` to return a `Map<Object, String>` instead of raw `Collection<Object>` * Use the value from that map in the `IntegrationFlowBeanPostProcessor` as a fallback option before walking into bean name generation * Provide `containerId` option for the AMQP DSL components * Revert `@AfterClass` in the `AmqpTests` * Expose `id()` for the `JmsDestinationAccessorSpec` * Register `ListenerContainer` and `JmsTemplate` as bean via `ComponentRegistration` in the particular JMS Java DSL components * Fix `Jms` factory to populate the `JmsDefaultListenerContainerSpec` for the `messageDrivenChannelAdapter()` without class specified * Refactor AMQP DSL Inbound components to deal with the new ContainerSpec API * Remove `containerId()` in favor of `id()` in the ContainerSpec
This commit is contained in:
committed by
Gary Russell
parent
2b99c191f6
commit
ea89682368
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016 the original author or authors.
|
||||
* Copyright 2016-2017 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.
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.springframework.integration.scripting.dsl;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -126,8 +125,8 @@ public class ScriptMessageSourceSpec extends MessageSourceSpec<ScriptMessageSour
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Object> getComponentsToRegister() {
|
||||
return Collections.singletonList(this.delegate.get());
|
||||
public Map<Object, String> getComponentsToRegister() {
|
||||
return Collections.singletonMap(this.delegate.get(), this.delegate.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user