title: Apache commons configuration spring intergration
body: <p>I am new to apache commons configurations and would like to include it in my project. I have the following code from apache commons page </p>
  
  <pre><code>@Configuration
  static class Config {
  
    @Bean
    public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer(ConfigurableEnvironment env)
      throws ConfigurationException {
      PropertySourcesPlaceholderConfigurer configurer = new PropertySourcesPlaceholderConfigurer();
      MutablePropertySources sources = new MutablePropertySources();
      sources.addLast(new ConfigurationPropertySource("xml configuration", new Configurations().xml("aXmlConfigFile.xml")));
      configurer.setPropertySources(sources);
      configurer.setEnvironment(env);
      return configurer;
    }
  }
  </code></pre>
  
  <p>Problem is if i do <code>envirnment.getProperty("some_key")</code> this is empty. Does it only work as @Value and not when using <code>Environment</code>.</p>
  
  <p>Also how i can override properties at runtime and persists it to files they belong...</p>