gpt4 book ai didi

java - 计划任务响应 channel spring-integration

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:56:55 26 4
gpt4 key购买 nike

我如何将来自 task:scheduled in spring-intgeration 的响应传递给 channel ?

<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 方法对 channel outboundComplexChannel 的返回响应

如果有任何方法,请提供

谢谢

最佳答案

改为使用入站 channel 适配器

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

关于java - 计划任务响应 channel spring-integration,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17621713/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com