Search in sources :

Example 1 with PropertySourcesPlaceholderConfigurer

use of cn.taketoday.context.support.PropertySourcesPlaceholderConfigurer in project today-framework by TAKETODAY.

the class PropertySourcesDeducer method getPropertySources.

PropertySources getPropertySources() {
    PropertySourcesPlaceholderConfigurer configurer = getSinglePropertySourcesPlaceholderConfigurer();
    if (configurer != null) {
        return configurer.getAppliedPropertySources();
    }
    PropertySources sources = extractEnvironmentPropertySources();
    Assert.state(sources != null, "Unable to obtain PropertySources from PropertySourcesPlaceholderConfigurer or Environment");
    return sources;
}
Also used : PropertySources(cn.taketoday.core.env.PropertySources) PropertySourcesPlaceholderConfigurer(cn.taketoday.context.support.PropertySourcesPlaceholderConfigurer)

Aggregations

PropertySourcesPlaceholderConfigurer (cn.taketoday.context.support.PropertySourcesPlaceholderConfigurer)1 PropertySources (cn.taketoday.core.env.PropertySources)1