title: Automatic refresh of Config Clients not working in Spring Boot 2
body: <p>I am trying to migrate a simple example code with <code>Spring Cloud Config Server</code> and <code>RabbitMQ</code> as <code>Spring Cloud Bus</code> (based on <code>Spring Boot 1.5.22.RELEASE</code> and <code>Spring Cloud Brixton.SR7</code>) to  <code>Spring Boot 2.2.6.RELEASE</code> and <code>Spring Cloud Hoxton.SR3</code>. The example consists of a Config Server, a Config Client, <code>GitLab</code> as SCM and <code>RabbitMQ</code>(3.8 - Erlang 22.1.5). The code is compiling, starting up, the push webhook is triggered and can also be seen in the server's and client's log. </p>
  
  <p>The problem is that the property updated in Git is not updated in the client. On the base of the <code>Spring Boot 1.5.22.RELEASE</code> and <code>Spring Cloud Brixton.SR7</code> it works reliable.
  But if I do <code>curl -X POST http://localhost:8889/actuator/bus-refresh</code> manually, the property will be updated.</p>
  
  <p>What can be the problem or which property have I forgotten to configure?</p>
  
  <p>Here is my configuration/code:</p>
  
  <p><strong>GitLab (started as Docker container)</strong> 
  Push WebHook: <a href="http://user:password@localhost:8889/monitor" rel="nofollow noreferrer">http://user:password@localhost:8889/monitor</a></p>
  
  <p><strong>RabbitMQ (started as Docker container)</strong>
  no particular configuration</p>
  
  <p><strong><code>pom.xml</code> Root module of Config server and client:</strong> </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
      &lt;modules&gt;
          &lt;module&gt;spring-config-server&lt;/module&gt;
          &lt;module&gt;spring-config-client&lt;/module&gt;
      &lt;/modules&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.2.6.RELEASE&lt;/version&gt;
          &lt;relativePath/&gt;
      &lt;/parent&gt;
  
      &lt;groupId&gt;com.myorg&lt;/groupId&gt;
      &lt;artifactId&gt;spring-config-mgmt&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-cloud-dependencies&lt;/artifactId&gt;
                  &lt;version&gt;${spring-cloud-dependencies.version}&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;spring-milestones&lt;/id&gt;
              &lt;name&gt;Spring Milestones&lt;/name&gt;
              &lt;url&gt;https://repo.spring.io/milestone&lt;/url&gt;
              &lt;snapshots&gt;
                  &lt;enabled&gt;false&lt;/enabled&gt;
              &lt;/snapshots&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;properties&gt;
          &lt;spring-cloud-dependencies.version&gt;Hoxton.SR3&lt;/spring-cloud-dependencies.version&gt;
      &lt;/properties&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p><strong><code>pom.xml</code> of Config Server:</strong></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;parent&gt;
          &lt;artifactId&gt;spring-config-mgmt&lt;/artifactId&gt;
          &lt;groupId&gt;com.myorg&lt;/groupId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;artifactId&gt;spring-config-server&lt;/artifactId&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-config-server&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.junit.vintage&lt;/groupId&gt;
                      &lt;artifactId&gt;junit-vintage-engine&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-config-monitor&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter-stream-rabbit&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-bus&lt;/artifactId&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  
  &lt;/project&gt;
  </code></pre>
  
  <p><strong><code>pom.xml</code> of Config Client:</strong></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;parent&gt;
          &lt;artifactId&gt;spring-config-mgmt&lt;/artifactId&gt;
          &lt;groupId&gt;com.myorg&lt;/groupId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;artifactId&gt;spring-config-client&lt;/artifactId&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter-config&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.junit.vintage&lt;/groupId&gt;
                      &lt;artifactId&gt;junit-vintage-engine&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter-bus-amqp&lt;/artifactId&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  
  &lt;/project&gt;
  </code></pre>
  
  <p><strong><code>application.yml</code> of Config Server:</strong> </p>
  
  <pre class="lang-yaml prettyprint-override"><code>server:
    port: 8889
  
  spring:
    cloud:
      config:
        server:
          git:
            uri: git@localhost:root/springcloudconfig.git
            clone-on-start: true
  
    rabbitmq:
      host: localhost
      port: 5672
      username: guest
      password: guest
  
  logging:
    level:
      org.springframework: DEBUG
  
  </code></pre>
  
  <p><strong><code>application.yml</code> of Config Client:</strong></p>
  
  <pre class="lang-yaml prettyprint-override"><code>spring:
    rabbitmq:
      host: localhost
      port: 5672
      username: guest
      password: guest
  
  logging:
    level:
      org.springframework: TRACE
  
  </code></pre>
  
  <p><strong><code>bootstrap.properties</code> of Config Client:</strong></p>
  
  <pre><code>spring.application.name=config-client
  spring.profiles.active=development
  spring.cloud.config.uri=http://localhost:8889
  spring.cloud.config.fail-fast=true
  management.security.enabled=false
  </code></pre>
  
  <p><strong>Config Server:</strong></p>
  
  <pre class="lang-java prettyprint-override"><code>import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.cloud.config.server.EnableConfigServer;
  
  @SpringBootApplication
  @EnableConfigServer
  public class Application {
  
      public static void main(String[] args) {
          SpringApplication.run(Application.class, args);
      }
  }
  </code></pre>
  
  <p><strong>Config Client:</strong></p>
  
  <pre class="lang-java prettyprint-override"><code>import org.springframework.beans.factory.annotation.Value;
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.cloud.context.config.annotation.RefreshScope;
  import org.springframework.scheduling.annotation.Scheduled;
  
  @SpringBootApplication
  @RefreshScope
  @EnableScheduling
  public class Application {
  
      @Value("${myProperty}")
      private String myProperty;
  
      public static void main(String[] args) {
          SpringApplication.run(Application.class, args);
      }
  
      @Scheduled(fixedDelay =1000)
      public void printProperty() {
          System.out.println("Value of property \"myProperty\": " + myProperty);
      }
  }
  
  </code></pre>
  
  <p>Many thanks in advance</p>