我想开始有条件的 mule quartz.. 例如:在 mule peroperties 文件中,我设置了一个 flag=on。如果该标志打开,那么调度程序将启动。如果该标志关闭,则不会调用 schedule。
我如何在 mule 中执行此操作? 请帮忙
最佳答案
Mule 与 Spring 相连,所以 the tricks/features you can use to make some beans conditional应该也适用于 Mule。
我会尝试以下方法:
- 将启动 Quartz 端点的流定义提取到
quartz-config-on.xml
中 - 创建一个名为
quartz-config-off.xml
的空 Mule XML 配置 - 在您的主要 Mule XML 配置中,使用:
<import resource="quartz-config-${quartz.flag}.xml"/>
其中quartz.flag
是on
的属性或off
关于mule - 有条件地运行 Mule Quartz,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35100683/