Interface Dotenv


  • public interface Dotenv
    Creates and configures a new Dotenv instance
    • Method Detail

      • load

        static Dotenv load()
        Creates and loads a Dotenv instance with default options
        Returns:
        a new Dotenv instance
      • entries

        Set<DotenvEntry> entries()
        Returns the set of environment variables with values
        Returns:
        the set of DotenvEntrys for all environment variables
      • get

        String get​(String key)
        Retrieves the value of the environment variable specified by key
        Parameters:
        key - the environment variable
        Returns:
        the value of the environment variable
      • get

        String get​(String key,
                   String defaultValue)
        Retrieves the value of the environment variable specified by key. If the key does not exist, then the default value is returned
        Parameters:
        key - the environment variable
        defaultValue - the default value to return
        Returns:
        the value of the environment variable or default value