【发布时间】:2012-12-13 11:12:39
【问题描述】:
我正在使用 spring 框架中的调度程序。我想在运行时通过 jmx-console 配置调度程序时间。这可能吗?
例如@Scheduled(cron = "0/10 * * * * *") 我想在运行时给出新值
【问题讨论】:
我正在使用 spring 框架中的调度程序。我想在运行时通过 jmx-console 配置调度程序时间。这可能吗?
例如@Scheduled(cron = "0/10 * * * * *") 我想在运行时给出新值
【问题讨论】:
我不认为现在这很容易,但肯定有可能。您必须公开一种机制以将触发器 bean 重新注入调度程序。如果你想看到一个选项,我在这里做了:https://github.com/SpringSource/cloudfoundry-samples/blob/master/stocks/src/main/resources/server-bootstrap-config.xml。
【讨论】: