something I tried:
Inbound & outboun channels :
Code:
<file:inbound-channel-adapter id="inputChannel" directory="file:C:/input">
<poller>
<interval-trigger interval="1000" />
</poller>
</file:inbound-channel-adapter>
<file:outbound-channel-adapter id="outputChannel" directory="C:/output" />
Router :
Code:
<router ref="recipientListRouter" input-channel="inputChannel"/>
The class org.springframework.integration.router.RecipientLi stRouter have a property "List<MessageChannel> channels", so I wrote
Code:
<beans:bean id="recipientListRouter"
class="org.springframework.integration.router.RecipientListRouter">
<beans:property name="channels">
<beans:list>
<beans:ref bean="outputChannel" />
</beans:list>
</beans:property>
</beans:bean>
and here comes trouble :
if I try <beans:ref local="outputChannel" /> I have the exception :
Caused by: org.xml.sax.SAXParseException: cvc-id.1: There is no ID/IDREF binding for IDREF 'outputChannel'.
and if I try <beans:ref bean="outputChannel" /> :
org.springframework.beans.factory.UnsatisfiedDepen dencyException:
Error creating bean with name 'org.springframework.integration.router.MethodInvo kingRouter#0':
Unsatisfied dependency expressed through constructor argument with index 1 of type [java.lang.String]:
Ambiguous constructor argument types - did you specify the correct bean references as constructor arguments?