title: How to inject system property into static bean in configuration?
body: <p>In my Spring <code>@Configuration</code> class I wish to inject the system property <code>${brand}</code> into a static String bean called <code>brandString</code>. I have succeeded doing that with the workaround described here <a href="https://stackoverflow.com/a/19622075/1019830">https://stackoverflow.com/a/19622075/1019830</a> using <code>@PostConstruct</code> and assigning the static field an instance field value injected through <code>@Value</code>:</p>
  
  <pre><code>@Configuration
  public class AppConfig {
  
    @Value("${brand}")
    private String brand;
    private static String brandString;
  
    @PostConstruct
    public void init() {
      brandString = brand;
    }
  
    @Bean
    public static String brandString() {
      return brandString;
    }
  
    // public static PropertyPlaceHolderConfigurer propertyPlaceHolderConfigurer() {...}
  </code></pre>
  
  <p>Is there another way of statically inject the value of <code>${brand}</code> into the <code>brandString</code> field, without the workaround using another "copy" <code>brand</code> and a <code>@PostConstruct</code> method?</p>