I have a simple application where i am using several properties-files to fetch content edited by other users (links to sites etc).
The class where i load the properties look like this:
@Configuration
@PropertySource("classpath:salestipsWhitelist.properties")
public class SalestipsWhitelist {
@Autowired
Environment env;
public Environment getEnv() {
return env;
}
public void setEnv(Environment env) {
this.env = env;
}
@Bean
public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
return new PropertySourcesPlaceholderConfigurer();
}
}
Some of the properties file:
UPS_MPP_M_L=True
UPS_MPP_M_M=True
UPS_MPP_M_MP=True
UPS_MPP_M_S=True
This works fine, but if i make changes to the properties-file, i have to reload the app to visualise any changes made.
Is it possible, if i move the location to disk instead of classpath, to reload this periodically or manually? I do not want this to be done automatically on change, as i want to have control over when this is done / updated.