public final class ConfigurationPropertySources extends Object
ConfigurationPropertySources.| Modifier and Type | Method and Description | 
|---|---|
| static void | attach(org.springframework.core.env.Environment environment)Attach a  ConfigurationPropertySourcesupport to the specifiedEnvironment. | 
| static Iterable<ConfigurationPropertySource> | from(Iterable<org.springframework.core.env.PropertySource<?>> sources)Return  Iterablecontaining newConfigurationPropertySourceinstances adapted from the given SpringPropertySources. | 
| static Iterable<ConfigurationPropertySource> | from(org.springframework.core.env.PropertySource<?> source)Return  Iterablecontaining a single newConfigurationPropertySourceadapted from the given SpringPropertySource. | 
| static Iterable<ConfigurationPropertySource> | get(org.springframework.core.env.Environment environment)Return a set of  ConfigurationPropertySourceinstances that have previously
 beenattachedto theEnvironment. | 
| static boolean | isAttachedConfigurationPropertySource(org.springframework.core.env.PropertySource<?> propertySource)Determines if the specific  PropertySourceis theConfigurationPropertySourcethat wasattachedto theEnvironment. | 
public static boolean isAttachedConfigurationPropertySource(org.springframework.core.env.PropertySource<?> propertySource)
PropertySource is the
 ConfigurationPropertySource that was attached
 to the Environment.propertySource - the property source to testtrue if this is the attached ConfigurationPropertySourcepublic static void attach(org.springframework.core.env.Environment environment)
ConfigurationPropertySource support to the specified
 Environment. Adapts each PropertySource managed by the environment
 to a ConfigurationPropertySource and allows classic
 PropertySourcesPropertyResolver calls to resolve using
 configuration property names.
 
 The attached resolver will dynamically track any additions or removals from the
 underlying Environment property sources.
environment - the source environment (must be an instance of
 ConfigurableEnvironment)get(Environment)public static Iterable<ConfigurationPropertySource> get(org.springframework.core.env.Environment environment)
ConfigurationPropertySource instances that have previously
 been attached to the Environment.environment - the source environment (must be an instance of
 ConfigurableEnvironment)IllegalStateException - if not configuration property sources have been
 attachedpublic static Iterable<ConfigurationPropertySource> from(org.springframework.core.env.PropertySource<?> source)
Iterable containing a single new ConfigurationPropertySource
 adapted from the given Spring PropertySource.source - the Spring property source to adaptIterable containing a single newly adapted
 SpringConfigurationPropertySourcepublic static Iterable<ConfigurationPropertySource> from(Iterable<org.springframework.core.env.PropertySource<?>> sources)
Iterable containing new ConfigurationPropertySource
 instances adapted from the given Spring PropertySources.
 
 This method will flatten any nested property sources and will filter all
 stub property sources. Updates to the underlying source,
 identified by changes in the sources returned by its iterator, will be
 automatically tracked. The underlying source should be thread safe, for example a
 MutablePropertySources
sources - the Spring property sources to adaptIterable containing newly adapted
 SpringConfigurationPropertySource instancesCopyright © 2020 Pivotal Software, Inc.. All rights reserved.