Class EnvironmentPropertySource

java.lang.Object
io.micronaut.context.env.MapPropertySource
io.micronaut.context.env.EnvironmentPropertySource
All Implemented Interfaces:
PropertySource, Ordered, Iterable<String>

public class EnvironmentPropertySource extends MapPropertySource
Loads properties from environment variables via System.getenv().
Since:
1.0
Author:
Graeme Rocher
  • Field Details

  • Constructor Details

    • EnvironmentPropertySource

      public EnvironmentPropertySource()
      Default constructor.
    • EnvironmentPropertySource

      public EnvironmentPropertySource(@Nullable @Nullable List<String> includes, @Nullable @Nullable List<String> excludes)
      Allows for control over which environment variables are included.
      Parameters:
      includes - The environment variables to include in configuration
      excludes - The environment variables to exclude from configuration
  • Method Details

    • getOrder

      public int getOrder()
      Returns:
      The order of the object. Defaults to zero (no order).
    • getConvention

      public PropertySource.PropertyConvention getConvention()
      Returns:
      Whether the property source has upper case underscore separated keys