-1

I have a springboot application and an application.properties file from which the values get fetched when the application runs. I am finding a solution to change the property values and reload it without server restart.

Using spring-cloud-config is a solution I know, but I cant use the cloud config in our application . Please suggest if there is any other way to reload the property files using springboot.

1 Answers1

0

You can use archaius available at https://github.com/Netflix/archaius.

Here is how you use it.

DynamicStringProperty property = getDynamicPropertyFactoryInstance()
    .getStringProperty(key, StringUtils.EMPTY);

You will have to create a wrapper now to read all values from config.properties file. Archaius reads and returns updated values from config.properties file by default.

Gaurav
  • 3,614
  • 3
  • 30
  • 51