Normally, we can use a cron expression defined as "cron.expression
" in the default property file, as follows:
@Scheduled(cron = "${cron.expression}")
public void demoServiceMethod(){
}
But I wish to define a property file for this class itself, and use the "cron.expression
" property from this file. How can I do that?
P.S: I am using Java 1.7