Our service has a process that is scheduled according to the properties file by reading the refreshIntervalMillis property. Its value is entered directly into the Quartz trigger with this configuration:
<bean name="trigger" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean " p:repeatInterval="${refreshIntervalMillis}"> ... </bean>
However, the administrators who install this service think about the hours / days, so to simplify them, we changed this to:
- Renamed refreshIntervalMillis to refreshIntervalMinutes
- Changed for the code above:
p: repeatInterval = "# {1000 * 60 * T (java.lang.Integer) .valueOf (@configurationProperties ['garbageLevelWatcher.refreshIntervalMinutes'])}"
Note. The property object appears as a bean named "configurationProperties"
Is there a simpler syntax to achieve the same?
Thanks,
source share