Class ConfigData
java.lang.Object
org.springframework.boot.context.config.ConfigData
Configuration data that has been loaded from a
ConfigDataResource
and may
ultimately contribute property sources
to Spring's
Environment
.- Since:
- 2.4.0
- Author:
- Phillip Webb, Madhura Bhave
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Option flags that can be applied.static final class
A set ofConfigData.Option
flags.static interface
Strategy interface used to supplyConfigData.Options
for a givenPropertySource
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final ConfigData
AConfigData
instance that contains no data. -
Constructor Summary
ConstructorDescriptionConfigData
(Collection<? extends PropertySource<?>> propertySources, ConfigData.Option... options) Create a newConfigData
instance with the same options applied to each source.ConfigData
(Collection<? extends PropertySource<?>> propertySources, ConfigData.PropertySourceOptions propertySourceOptions) Create a newConfigData
instance with specific property source options. -
Method Summary
Modifier and TypeMethodDescriptiongetOptions
(PropertySource<?> propertySource) Return theconfig data options
that apply to the given source.List<PropertySource<?>>
Return the configuration data property sources in ascending priority order.
-
Field Details
-
EMPTY
AConfigData
instance that contains no data.
-
-
Constructor Details
-
ConfigData
public ConfigData(Collection<? extends PropertySource<?>> propertySources, ConfigData.Option... options) Create a newConfigData
instance with the same options applied to each source.- Parameters:
propertySources
- the config data property sources in ascending priority order.options
- the config data options applied to each source- See Also:
-
ConfigData
public ConfigData(Collection<? extends PropertySource<?>> propertySources, ConfigData.PropertySourceOptions propertySourceOptions) Create a newConfigData
instance with specific property source options.- Parameters:
propertySources
- the config data property sources in ascending priority order.propertySourceOptions
- the property source options- Since:
- 2.4.5
-
-
Method Details
-
getPropertySources
Return the configuration data property sources in ascending priority order. If the same key is contained in more than one of the sources, then the later source will win.- Returns:
- the config data property sources
-
getOptions
Return theconfig data options
that apply to the given source.- Parameters:
propertySource
- the property source to check- Returns:
- the options that apply
- Since:
- 2.4.5
-