DSL: Use generic AppListener fromIntFlowBPP

https://build.spring.io/browse/INTSAMPLES-NIGHTLY-JOB1-1189

Since `spring-integration-even` is optional dependency, the usage of `ApplicationEventListeningMessageProducer` is wrong.
Changing it to the generic `ApplicationListener` doesn't hurt for any inline components from Flow definition, when there is an interest to handle Events.
This commit is contained in:
Artem Bilan
2014-11-10 13:04:40 +02:00
parent a04cdbf77f
commit 57caf41fb2

View File

@@ -42,7 +42,6 @@ import org.springframework.integration.dsl.SourcePollingChannelAdapterSpec;
import org.springframework.integration.dsl.StandardIntegrationFlow;
import org.springframework.integration.dsl.core.ConsumerEndpointSpec;
import org.springframework.integration.dsl.support.MessageChannelReference;
import org.springframework.integration.event.inbound.ApplicationEventListeningMessageProducer;
import org.springframework.integration.support.context.NamedComponent;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.MessageHandler;
@@ -181,7 +180,7 @@ public class IntegrationFlowBeanPostProcessor implements BeanPostProcessor, Bean
.values()
.contains(component)) {
registerComponent(component, generateBeanName(component));
if (ApplicationEventListeningMessageProducer.class.isAssignableFrom(
if (ApplicationListener.class.isAssignableFrom(
AopUtils.getTargetClass(component))
&& this.beanFactory.containsBean(
AbstractApplicationContext.APPLICATION_EVENT_MULTICASTER_BEAN_NAME)) {