diff --git a/spring-cloud-config.html b/spring-cloud-config.html index d25d4f0c..f5a2b43b 100644 --- a/spring-cloud-config.html +++ b/spring-cloud-config.html @@ -423,18 +423,17 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
  • Spring Cloud Config Server
  • Spring Cloud Config Client
    -

    This covers a large class of refresh use cases, and you can verify the -changes by visiting the /configprops endpoint (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. It does not cover another large class of use cases, where -you need more control over the refresh, and where you need a -configuration change to be atomic over the whole +

    Note that the Config Client does not by default poll for changes in +the Environment, and generally we would not recommend that approach +for detecting changes (although you could set it up with a +@Scheduled annotation). If you have a scaled-out client application +then it is better to broadcast the EnvironmentChangedEvent to all +the instances instead of having them polling for changes (e.g. using +the Spring Cloud +Bus).

    +
    +
    +

    The EnvironmentChangedEvent covers a large class of refresh use +cases, as long as you can actually make a change to the Environment +and publish the event (those APIs are public and part of core +Spring). You can verify the changes are bound to +@ConfigurationProperties beans by visiting the /configprops +endpoint (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.

    @@ -1302,7 +1301,7 @@ grabbing it in the bootstrap context and injecting one).