Dennis, For Commons 1.x, my team followed this example to create a bridge:
https://gist.github.com/danieldbower/2702482 Then, we created an extension of Spring's PropertySourceLoader that instantiates this class, therefore we can use commons config with @Value. This was all bridged using Spring Initializer approach. The other alternative we used was to create a static bean in our config class that looks something like: @Bean public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer(ConfigurableEnvironment env) { PropertySourcesPlaceholderConfigurer configurer = new PropertySourcesPlaceholderConfigurer(); MutablePropertySources sources = new MutablePropertySources(); sources.addLast(new ApacheCommonsConfigPropertySource(<your loaded commons config class>)); configurer.setPropertySources(sources); configurer.setEnvironment(env); return configurer; } We are just now starting to assess Config 2, but I would assume these approaches would still work. Thanks, Ron DiFrango On 3/31/16, 8:27 AM, "Dennis Kieselhorst" <d...@apache.org> wrote: >Hi, > >great to see that Commons Configuration 2.0 is out. > >There is one question that appeared during the migration in one of my >projects. With Commons Configuration 1.0 a Spring modules factory bean >(org.springmodules.commons.configuration.CommonsConfigurationFactoryBean) was >used to directly use Commons Configuration with Spring's >PropertyPlaceholderConfigurer. As this is no longer maintained, the >question is how to do this with Commons Configuration 2.0. > >Of course it should be possible to copy the existing Spring modules >source code to the project and migrate it to 2.0. Is there some better >way to do this? I know Spring offers YAML, but it should be still >Commons Configuration (the existing XML configuration files should not >be affected). > >Cheers >Dennis > >--------------------------------------------------------------------- >To unsubscribe, e-mail: user-unsubscr...@commons.apache.org >For additional commands, e-mail: user-h...@commons.apache.org > > ________________________________________________________ The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.