Class EnvironmentPropertySource
java.lang.Object
io.micronaut.context.env.MapPropertySource
io.micronaut.context.env.EnvironmentPropertySource
- All Implemented Interfaces:
PropertySource, Ordered, Iterable<String>
Loads properties from environment variables via
System.getenv().- Since:
- 1.0
- Author:
- Graeme Rocher
-
Nested Class Summary
Nested classes/interfaces inherited from interface PropertySource
PropertySource.Origin, PropertySource.PropertyConvention -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstant for Environment property source.static final PropertySource.Originstatic final intThe position of the loader.Fields inherited from interface Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEFields inherited from interface PropertySource
CONTEXT -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.EnvironmentPropertySource(@Nullable List<String> includes, @Nullable List<String> excludes) Allows for control over which environment variables are included. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
POSITION
public static final int POSITIONThe position of the loader.- See Also:
-
NAME
-
ORIGIN
-
-
Constructor Details
-
EnvironmentPropertySource
public EnvironmentPropertySource()Default constructor. -
EnvironmentPropertySource
Allows for control over which environment variables are included.- Parameters:
includes- The environment variables to include in configurationexcludes- The environment variables to exclude from configuration
-
-
Method Details
-
getOrder
public int getOrder()- Returns:
- The order of the object. Defaults to zero (no order).
-
getOrigin
- Returns:
- The origin of the property source.
-
getConvention
- Returns:
- Whether the property source has upper case underscore separated keys
-