Class EnvironmentConfigSourceBuilder


  • public final class EnvironmentConfigSourceBuilder
    extends SourceBuilder<EnvironmentConfigSourceBuilder,​EnvironmentConfigSource>
    ConfigSourceBuilder for the Class Path Config Source.

    Convert the Environment Variables to a property file. Apply the supplied transforms as we convert it. Then write that as an input stream for the next stage in the parsing.

    • Method Detail

      • isFailOnErrors

        public boolean isFailOnErrors()
        Get if we should fail on errors for the config source.
        Returns:
        if we should fail on errors for the config source
      • setFailOnErrors

        public EnvironmentConfigSourceBuilder setFailOnErrors​(boolean failOnErrors)
        Set if we should fail on errors for the config source.
        Parameters:
        failOnErrors - Set if we should fail on errors for the config source.
        Returns:
        the builder
      • getPrefix

        public java.lang.String getPrefix()
        Get the prefix we scan for. This will only include the environment variables that match the prefix.
        Returns:
        the prefix we scan for.
      • setPrefix

        public EnvironmentConfigSourceBuilder setPrefix​(java.lang.String prefix)
        Set the prefix we scan for. This will only include the environment variables that match the prefix.
        Parameters:
        prefix - the prefix we scan for.
        Returns:
        the builder
      • isRemovePrefix

        public boolean isRemovePrefix()
        Get if we should remove the prefix in the environment variables.
        Returns:
        If we should remove the prefix in the environment variables.
      • setRemovePrefix

        public EnvironmentConfigSourceBuilder setRemovePrefix​(boolean removePrefix)
        Set if we should remove the prefix in the environment variables.
        Parameters:
        removePrefix - if we should remove the prefix in the environment variables.
        Returns:
        the builder