2013-07-12 43 views
1

如何將來自任務的響應傳遞給計劃在spring-intgeration中的通道?針對通道彈簧整合的計劃任務響應

<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

請提供,如果這樣做

感謝

回答

8

使用入站通道 - 的任何方式替代適配器

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

謝謝加里,它幫助 – Chakri

+0

一個小的錯字:) –