1

Can @ConfigurationProperties annotated class be auto refreshed when a value is changed in application.properties ?

Or do we have to restart to make the new value apply?

1 Answer 1

1

Short answer: "no". There is no general way to know if a change in application.properties requires a restart (e.g. a TCP port change) or not. If you know that a change will not require a restart then you can rebind the configuration properties using the PropertiesConfigurationFactory (or the public API of ConfigurationPropertiesBindingPostProcessor).

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.