I am using spring 3.0.7 and some scheduled jobs:
public class TestScheduler implements Runnable{
private String someValue;
public void setSomeValue(String someValue) {
this.someValue= someValue;
}
@Override
public void run(){
LOGGER.info("Some value: " + this.someValue);
}
Configuration:
<property name="someValue" value="${config.someValue}"/>
The value ${config.someValue} is defined in a config.properties file.
I would like to be able to read the value on this config file every time the scheduled job is executing the run() method, so I don´t have to restart the server every time I change the value of the variable I want to print.
Is there any procedure to do it? I have been reading about @BeforeJob annotation, but I don´t know how could I apply it on scheduled jobs, since the documentation I read is based on JobExecution.
Thanks in advance