Annotation Type EnvironmentVariable


  • @Retention(RUNTIME)
    @Target(FIELD)
    public @interface EnvironmentVariable
    This annotation can be declared on a field in which an environment variable should be injected.
    Author:
    Greg Schofield (gregs@indellient.com)
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String value
      The environment variable to load.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String defaultValue
      The default value to set in case the environment variable does not exist or cannot be loaded.
      boolean failFast
      Flag to fail the configuration process if the environment variable is absent
      int order
      Injection order regarding other annotations.
    • Element Detail

      • value

        String value
        The environment variable to load.
        Returns:
        The environment variable to load
      • defaultValue

        String defaultValue
        The default value to set in case the environment variable does not exist or cannot be loaded.
        Returns:
        the default value to set
        Default:
        ""
      • failFast

        boolean failFast
        Flag to fail the configuration process if the environment variable is absent
        Returns:
        true if the configuration process should fail fast if the environment variable is absent
        Default:
        false
      • order

        int order
        Injection order regarding other annotations.
        Returns:
        injection order regarding other annotations
        Default:
        0