java - 如何在临时基础上触发入站通道适配器?
问题描述
我的配置如下所示,我使用入站通道适配器触发 bean 类以生成每天发送的文件。除了预定的工作之外,我还需要设施来临时运行它。我看不出有什么方法可以做到这一点。
我能想到的唯一方法是获取 SourcePollingChannelAdapter 的实例,设置新触发器(使用新的 cron 表达式)并重新启动端点。让我知道是否有更好的方法来做到这一点。
<int:inbound-channel-adapter ref="xxxTask" method="executeXXXTask" channel="fileOutChannel">
<int:poller cron="0 30 4 ? * *"/>
</int:inbound-channel-adapter>
解决方案
推荐阅读
- javascript - 如何获取在javascript中具有共同价值的对象键?
- android - ReactNative:如何在 pubnub 通知 android 中自定义声音?
- rust - Rust:如何使用 Arc 在新生成的线程中使用特征中定义的方法?
- python-3.x - 尝试接收条带挂钩时在 Django 上获取 MultiValueDictKeyError
- python - 打印任何句子的第二个单词的函数当字符串像“ghanou djellal”时我遇到问题它什么也不返回
- c - 为什么我的关于反转位的 C 代码不起作用?
- php - 从输入 PHP 在数组中添加数组
- rust - 如何处理 tokio::spawn 闭包需要'static 和 &self?
- python - ValueError:概率在 numpy 中不是非负数
- xml - 为 XML 指定命名空间的本地相对路径