Class EnvConfigSource
- All Implemented Interfaces:
Serializable,org.eclipse.microprofile.config.spi.ConfigSource
ConfigSource to access Environment Variables.
A property name matches to an environment variable with the following rules:
- Match alphanumeric characters (any case)
- Match non-alphanumeric characters with
_ - Closing quotes in the end of a property name require a double
_
Additionally, this implementation provides candidate matching dotted property name from the Environment
Variable name. These are required when a consumer relies on the list of properties to find additional
configurations. The MicroProfile Config specification defines a set of conversion rules to look up and find
values from environment variables even when using their dotted version, but it is unclear about property names.
Because an environment variable name may only be represented by a subset of characters, it is not possible
to represent exactly a dotted version name from an environment variable name, so consumers must be aware of such
limitations.
- See Also:
-
Field Summary
FieldsFields inherited from interface org.eclipse.microprofile.config.spi.ConfigSource
CONFIG_ORDINAL, DEFAULT_ORDINAL -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedEnvConfigSource(int ordinal) EnvConfigSource(Map<String, String> properties, int ordinal) -
Method Summary
Modifier and TypeMethodDescriptionMethods inherited from class io.smallrye.config.common.AbstractConfigSource
getName, getOrdinal, toString
-
Field Details
-
NAME
- See Also:
-
ORDINAL
public static final int ORDINAL- See Also:
-
-
Constructor Details
-
EnvConfigSource
protected EnvConfigSource() -
EnvConfigSource
protected EnvConfigSource(int ordinal) -
EnvConfigSource
-
-
Method Details
-
getProperties
-
getPropertyNames
-
getValue
-