title: @RefreshScope not working - Spring Boot
body: <p>I am following the approach described here: <a href="https://github.com/jeroenbellen/blog-manage-and-reload-spring-properties" rel="noreferrer">https://github.com/jeroenbellen/blog-manage-and-reload-spring-properties</a>, the only difference is that in my case, the properties are being used in multiple classes so I have put them all in one utility class <code>CloudConfig</code> and I refer to its variables using the getters. This is what the class looks like: </p>
  
  <pre><code>@Configuration
  @RefreshScope
  public class CloudConfig {
  
      static volatile int count; // 20 sec
  
      @Value("${config.count}")
      public void setCount(int count) {
          this.count = count;
      }
  
      public static int getCount() {
          return count;
      }
  
  }
  </code></pre>
  
  <p>and I use the variable <code>count</code> in other classes like <code>CloudConfig.getCount()</code>. I am able to load the properties on bootup just fine but I am not able to dynamically update them on the fly. Can anyone tell what I am doing wrong? If instead of making this config class, I do exactly what the tutorial describes everything works fine but I am having trouble adapting it to my usecase. Can anybody tell what I am missing?</p>