Package io.micronaut.context.env
Class EnvironmentPropertySource
- java.lang.Object
-
- io.micronaut.context.env.MapPropertySource
-
- io.micronaut.context.env.EnvironmentPropertySource
-
- All Implemented Interfaces:
PropertySource
,io.micronaut.core.order.Ordered
,java.lang.Iterable<java.lang.String>
public class EnvironmentPropertySource extends MapPropertySource
Loads properties from environment variables viaSystem.getenv()
.- Since:
- 1.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.micronaut.context.env.PropertySource
PropertySource.PropertyConvention
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NAME
Constant for Environment property source.static int
POSITION
The position of the loader.-
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Fields inherited from interface io.micronaut.context.env.PropertySource
CONTEXT
-
-
Constructor Summary
Constructors Constructor Description EnvironmentPropertySource()
Default constructor.EnvironmentPropertySource(java.util.List<java.lang.String> includes, java.util.List<java.lang.String> excludes)
Allows for control over which environment variables are included.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertySource.PropertyConvention
getConvention()
int
getOrder()
-
Methods inherited from class io.micronaut.context.env.MapPropertySource
asMap, get, getName, iterator, of, toString
-
-
-
-
Field Detail
-
POSITION
public static final int POSITION
The position of the loader.- See Also:
- Constant Field Values
-
NAME
public static final java.lang.String NAME
Constant for Environment property source.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EnvironmentPropertySource
public EnvironmentPropertySource()
Default constructor.
-
EnvironmentPropertySource
public EnvironmentPropertySource(@Nullable java.util.List<java.lang.String> includes, @Nullable java.util.List<java.lang.String> excludes)
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 Detail
-
getOrder
public int getOrder()
-
getConvention
public PropertySource.PropertyConvention getConvention()
- Returns:
- Whether the property source has upper case under score separated keys
-
-