预定任务响应通道spring-integration。

3

我该如何将Spring Integration中任务:scheduled的响应传递到通道?

<task:scheduled-tasks>
    <task:scheduled ref="loadFruits" method="loadFruits" cron="0/5 * * * * *"/>
</task:scheduled-tasks>  
<bean id="loadFruits" class="com.data.taskschedulers.LoadFruits"/>
<int:channel id="outboundComplexChannel"/>

现在我是否可以以某种方式读取loadFruits方法的返回响应到出站通道outboundComplexChannel中?
请提供任何可行的方法。
谢谢。
1个回答

10

使用inbound-channel-adapter代替

<int:inbound-channel-adapter ref="loadfruits" method="loadFruits"
        channel="outboundComplexChannel">
    <int:poller cron="0/5 * * * * *"/>
</int:inbound-channel-adapter>

<int:poller cron="0/5 * * * * *"/> 一个小笔误 :) - Ahmad.Masood

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接