I am using spring Environment Bean in my application to get application configuration properties. I want to change the value of a property in spring Environment from java code without restarting the application server. How can i do this?
@Service
public void MyService {
@Autowired
private Environment environment;
public void doSomething(){
String value = environment.getProperty("myproperty");
...
}
}
source
share