Class DotenvxPropertiesBuilder


  • public class DotenvxPropertiesBuilder
    extends Object
    Builds and loads properties instance with dotenvx support.
    • Field Detail

      • objectMapper

        public static final com.fasterxml.jackson.databind.ObjectMapper objectMapper
    • Constructor Detail

      • DotenvxPropertiesBuilder

        public DotenvxPropertiesBuilder()
    • Method Detail

      • directory

        public DotenvxPropertiesBuilder directory​(String path)
        Sets the directory containing the .properties file.
        Parameters:
        path - the directory containing the .properties file
      • filename

        public DotenvxPropertiesBuilder filename​(String name)
        Sets the name of the .properties file. The default is application.properties.
        Parameters:
        name - the filename or classpath resource,, such as `classpath:application.properties`
      • privateKey

        public DotenvxPropertiesBuilder privateKey​(String privateKeyHex)
        set the private key
        Parameters:
        privateKeyHex - private key in hexadecimal format
      • load

        public Properties load()
                        throws io.github.cdimascio.dotenv.DotenvException
        Load the contents of .properties into the virtual environment.
        Returns:
        a new Dotenv instance
        Throws:
        io.github.cdimascio.dotenv.DotenvException - when an error occurs
      • getDotenvxPrivateKey

        public String getDotenvxPrivateKey​(String profileName,
                                           String publicKeyHex)