Class SystemEnvironmentPropertySourceEnvironmentPostProcessor.OriginAwareSystemEnvironmentPropertySource
java.lang.Object
org.springframework.core.env.PropertySource<Map<String,Object>>
org.springframework.core.env.EnumerablePropertySource<Map<String,Object>>
org.springframework.core.env.MapPropertySource
org.springframework.core.env.SystemEnvironmentPropertySource
org.springframework.boot.support.SystemEnvironmentPropertySourceEnvironmentPostProcessor.OriginAwareSystemEnvironmentPropertySource
- All Implemented Interfaces:
PropertySourceInfo, OriginLookup<String>
- Enclosing class:
SystemEnvironmentPropertySourceEnvironmentPostProcessor
protected static class SystemEnvironmentPropertySourceEnvironmentPostProcessor.OriginAwareSystemEnvironmentPropertySource
extends SystemEnvironmentPropertySource
implements PropertySourceInfo, OriginLookup<String>
SystemEnvironmentPropertySource that also tracks Origin.- Since:
- 4.0.0
- Author:
- Madhura Bhave
-
Nested Class Summary
Nested classes/interfaces inherited from class PropertySource
PropertySource.StubPropertySource -
Field Summary
Fields inherited from class PropertySource
logger, name, source -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsProperty(String name) @Nullable OriginReturn the origin of the given key ornullif the origin cannot be determined.@Nullable StringReturn the implicit prefix that is applied when performing a lookup ornullif no prefix is used.@Nullable ObjectgetProperty(String name) booleanReturntrueif this lookup is immutable and has contents that will never change.Methods inherited from class SystemEnvironmentPropertySource
resolvePropertyNameMethods inherited from class MapPropertySource
getPropertyNames
-
Method Details
-
containsProperty
- Overrides:
containsPropertyin classSystemEnvironmentPropertySource
-
getProperty
- Overrides:
getPropertyin classSystemEnvironmentPropertySource
-
getOrigin
Description copied from interface:OriginLookupReturn the origin of the given key ornullif the origin cannot be determined.- Specified by:
getOriginin interfaceOriginLookup<String>- Parameters:
key- the key to lookup- Returns:
- the origin of the key or
null
-
getPrefix
Description copied from interface:PropertySourceInfoReturn the implicit prefix that is applied when performing a lookup ornullif no prefix is used. Prefixes can be used to disambiguate keys that would otherwise clash. For example, if multiple applications are running on the same machine a different prefix can be set on each application to ensure that different environment variables are used.- Specified by:
getPrefixin interfacePropertySourceInfo- Returns:
- the prefix applied by the lookup class or
null.
-
isImmutable
public boolean isImmutable()Description copied from interface:PropertySourceInfoReturntrueif this lookup is immutable and has contents that will never change.- Specified by:
isImmutablein interfacePropertySourceInfo- Returns:
- if the lookup is immutable
-