Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Re-read configuration without restart

Suppose I've got a Java application, which uses properties files as its configuration. Now I'd like to make the application re-read the configuration without restart. I'll call such configuration "refreshable".

What is the easiest way to do that?

Suppose I am developing an application from scratch. How should I design it to make its configuration "refreshable"?

like image 676
Michael Avatar asked Sep 06 '25 10:09

Michael


1 Answers

Using the commons-configuration is probably the easiest way to go. Here is an example of usage. There are many other features included, like hierarchical configuration (with overriding by defaults), JDBC sources, etc.

like image 115
Jiri Kremser Avatar answered Sep 09 '25 06:09

Jiri Kremser