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.
|
||||
@@ -17,7 +17,6 @@
|
||||
package org.springframework.integration.http.dsl;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -306,10 +305,10 @@ public abstract class BaseHttpInboundEndpointSpec<S extends BaseHttpInboundEndpo
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Object> getComponentsToRegister() {
|
||||
public Map<Object, String> getComponentsToRegister() {
|
||||
HeaderMapper<HttpHeaders> headerMapperToRegister =
|
||||
(this.explicitHeaderMapper != null ? this.explicitHeaderMapper : this.headerMapper);
|
||||
return Collections.singletonList(headerMapperToRegister);
|
||||
return Collections.singletonMap(headerMapperToRegister, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.springframework.integration.http.dsl;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -310,10 +309,11 @@ public abstract class BaseHttpMessageHandlerSpec<S extends BaseHttpMessageHandle
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Object> getComponentsToRegister() {
|
||||
public Map<Object, String> getComponentsToRegister() {
|
||||
this.target.setUriVariableExpressions(this.uriVariableExpressions);
|
||||
return Collections.singletonList(this.headerMapper);
|
||||
return Collections.singletonMap(this.headerMapper, null);
|
||||
}
|
||||
|
||||
protected abstract boolean isClientSet();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user