{@code PropertySource} objects are not typically used in isolation, but ratherthrough a {@link PropertySources} object, which aggregates property sources and inconjunction with a {@link PropertyResolver} implementation that can performprecedence-based searches across the set of {@code PropertySources}.
{@code PropertySource} identity is determined not based on the content ofencapsulated properties, but rather based on the {@link #getName() name} of the{@code PropertySource} alone. This is useful for manipulating {@code PropertySource}objects when in collection contexts. See operations in {@link MutablePropertySources}as well as the {@link #named(String)} and {@link #toString()} methods for details.
Note that when working with @ {@link org.springframework.context.annotation.Configuration Configuration} classes thatthe @ {@link org.springframework.context.annotation.PropertySource PropertySource}annotation provides a convenient and declarative way of adding property sources to the enclosing {@code Environment}. @author Chris Beams @since 3.1 @see PropertySources @see PropertyResolver @see PropertySourcesPropertyResolver @see MutablePropertySources @see org.springframework.context.annotation.PropertySource
|
|
|
|
|
|