Search in sources :

Example 1 with ImmutableConfiguration

use of org.apache.commons.configuration2.ImmutableConfiguration in project libresonic by Libresonic.

the class LibresonicPropertySourceConfigurer method initialize.

public void initialize(ConfigurableWebApplicationContext ctx) {
    ApacheCommonsConfigurationService configurationService = new ApacheCommonsConfigurationService();
    ImmutableConfiguration snapshot = configurationService.getImmutableSnapshot();
    PropertySource ps = new CommonsConfigurationPropertySource("libresonic-pre-init-configs", snapshot);
    ctx.getEnvironment().getPropertySources().addLast(ps);
    addDataSourceProfile(ctx);
}
Also used : ApacheCommonsConfigurationService(org.libresonic.player.service.ApacheCommonsConfigurationService) ImmutableConfiguration(org.apache.commons.configuration2.ImmutableConfiguration) PropertySource(org.springframework.core.env.PropertySource)

Aggregations

ImmutableConfiguration (org.apache.commons.configuration2.ImmutableConfiguration)1 ApacheCommonsConfigurationService (org.libresonic.player.service.ApacheCommonsConfigurationService)1 PropertySource (org.springframework.core.env.PropertySource)1