From c970a4a5dfdb0638d873fe9ef75beb97f02645b5 Mon Sep 17 00:00:00 2001 From: Ryan Baxter <524254+ryanjbaxter@users.noreply.github.com> Date: Thu, 3 Nov 2022 11:01:39 -0400 Subject: [PATCH] Add note about removing configuration values and performing refreshes. Fixes #1161 --- docs/src/main/asciidoc/spring-cloud-commons.adoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/src/main/asciidoc/spring-cloud-commons.adoc b/docs/src/main/asciidoc/spring-cloud-commons.adoc index 9044344e..c6698e83 100644 --- a/docs/src/main/asciidoc/spring-cloud-commons.adoc +++ b/docs/src/main/asciidoc/spring-cloud-commons.adoc @@ -214,6 +214,11 @@ Specifically, anything that depends on those beans cannot rely on them being upd In that case, it is rebuilt on a refresh and its dependencies are re-injected. At that point, they are re-initialized from the refreshed `@Configuration`). +NOTE: Removing a configuration value and then performing a refresh will not update the presence of the configuration value. +The configuration property must be present in order to update the value after a refresh. If you are relying on the presence of +a value in your application you might want to switch your logic to rely on its absence instead. Another option would be to rely +on the value changing rather than not being present in the application's configuration. + === Encryption and Decryption Spring Cloud has an `Environment` pre-processor for decrypting property values locally.