From a9f3d4bc3c606965d8e3b34b615cad51b8190644 Mon Sep 17 00:00:00 2001
From: buildmaster @ConfigurationProperties beans by visiting the /configprops endpoint (a normal Spring Boot Actuator feature).
For instance, a DataSource can have its maxPoolSize changed at runtime (the default DataSource created by Spring Boot is an @ConfigurationProperties bean) and grow capacity dynamically.
Re-binding @ConfigurationProperties does not cover another large class of use cases, where you need more control over the refresh and where you need a change to be atomic over the whole ApplicationContext.
-To address those concerns, we have @RefreshScope.
When there is a configuration change, a Spring @Bean that is marked as @RefreshScope gets special treatment.
+To address those concerns, we have @RefreshScope.
When there is a configuration change, a Spring @Bean that is marked as @RefreshScope gets special treatment.
This feature addresses the problem of stateful beans that only get their configuration injected when they are initialized.
For instance, if a DataSource has open connections when the database URL is changed via the Environment, you probably want the holders of those connections to be able to complete what they are doing.
Then, the next time something borrows a connection from the pool, it gets one with the new URL.
Sometimes, it might even be mandatory to apply the @RefreshScope
diff --git a/multi/multi_spring-cloud-commons.html b/multi/multi_spring-cloud-commons.html
index 4574a755..7fead57c 100644
--- a/multi/multi_spring-cloud-commons.html
+++ b/multi/multi_spring-cloud-commons.html
@@ -1,3 +1,3 @@
Table of Contents
Table of Contents