title: @Value with singleton in Java
body: <p>I have a class ResourcesProperties.java</p>
  
  <pre><code>@NoArgsConstructor
  @PropertySource("classpath:config.properties")
  @Component
  public class ResourcesProperties {
  
      @Bean
      public static PropertySourcesPlaceholderConfigurer propertyConf() {
          return new PropertySourcesPlaceholderConfigurer();
      }
  
      public static ResourcesProperties instance;
  
      @Bean
      public static ResourcesProperties getInstance() {
          if (instance == null)
              instance = new ResourcesProperties();
          return instance;
      }
  
      @Getter
      @Value("${room.rightStatusRoom}")
      private static boolean rightStatusRoom;
  
      @Getter
      @Value("${room.countGuests}")
      private static int countGuests;
  }
  </code></pre>
  
  <p>There is a "config.properties" property file</p>
  
  <pre><code>room.rightStatusRoom=true
  room.countGuests=101
  </code></pre>
  
  <p>Why, when accessing the of fields with @Value annotation, they don't return the specified values from property file?</p>
  
  <p>Example:</p>
  
  <pre><code>if(ResourcesProperties.getInstance().isRightStatusRoom()) { //returned false instead true
      //business-logic
  }
  </code></pre>