Reverted the RuntimeBeanReference to a String value for the constructor-arg of the Subscription object when parsing an endpoint. That is necessary to handle the case where channels are 'auto-created' by the MessageBus on demand (e.g. HelloWorldDemo).
This commit is contained in:
@@ -30,7 +30,6 @@ import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.integration.ConfigurationException;
|
||||
import org.springframework.integration.endpoint.ConcurrencyPolicy;
|
||||
import org.springframework.integration.handler.DefaultMessageHandlerAdapter;
|
||||
import org.springframework.integration.scheduling.PollingSchedule;
|
||||
import org.springframework.integration.scheduling.Schedule;
|
||||
import org.springframework.integration.scheduling.Subscription;
|
||||
@@ -111,7 +110,7 @@ public abstract class AbstractTargetEndpointParser extends AbstractSingleBeanDef
|
||||
}
|
||||
if (StringUtils.hasText(inputChannel)) {
|
||||
RootBeanDefinition subscriptionDef = new RootBeanDefinition(Subscription.class);
|
||||
subscriptionDef.getConstructorArgumentValues().addGenericArgumentValue(new RuntimeBeanReference(inputChannel));
|
||||
subscriptionDef.getConstructorArgumentValues().addGenericArgumentValue(inputChannel);
|
||||
if (schedule != null) {
|
||||
subscriptionDef.getConstructorArgumentValues().addGenericArgumentValue(schedule);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user