Package io.github.cdimascio.dotenv
Class DotenvxPropertiesBuilder
java.lang.Object
io.github.cdimascio.dotenv.DotenvxPropertiesBuilder
- All Implemented Interfaces:
DotenvxBaseBuilder
Builds and loads properties instance with dotenvx support.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.fasterxml.jackson.databind.ObjectMapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the directory containing the .properties file.Sets the name of the .properties file.getDotenvxPrivateKey(String profileName, String publicKeyHex) getPublicKeyHex(Properties properties) load()Load the contents of .properties into the virtual environment.privateKey(String privateKeyHex) set the private keyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.cdimascio.dotenv.DotenvxBaseBuilder
getPrivateKeyFromGlobalStore
-
Field Details
-
objectMapper
public static final com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Details
-
DotenvxPropertiesBuilder
public DotenvxPropertiesBuilder()
-
-
Method Details
-
directory
Sets the directory containing the .properties file.- Parameters:
path- the directory containing the .properties file
-
filename
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
set the private key- Parameters:
privateKeyHex- private key in hexadecimal format
-
load
Load the contents of .properties into the virtual environment.- Returns:
- a new
Dotenvinstance - Throws:
io.github.cdimascio.dotenv.DotenvException- when an error occurs
-
getPublicKeyHex
-
getDotenvxPrivateKey
-