We have a properties file in which we mention to take the properties to be taken from JSON/Zookeeper.
Example:
AppName : SampleApp
Inside SampleApp.properties we will specify
configmode=json
jsonfile=/config.json
There are many examples how to assign the properties inside the @Scheduled annotation using properties file.
But in this scenario ,
we have to read the property using some Java class (say Name is Config
) String cronExp=Config.get("CRONEXPRESSION") ;
and put that cron inside @Scheduled(cron = cronExp)
..Is this possible?
Note we cannot move the CRONEXPRESSION propepty to property file directly..Inside properties file we mention json..inside code we read that json and pick the property from there..