public class DotenvBuilder
Constructs a new DotenvBuilder
| Modifier and Type | Method and Description |
|---|---|
DotenvBuilder |
directory(java.lang.String path)
Sets the directory containing the .env file
|
DotenvBuilder |
filename(java.lang.String name)
Sets the name of the .env file. The default is .env
|
DotenvBuilder |
ignoreIfMalformed()
Do not throw an exception when .env is malformed
|
DotenvBuilder |
ignoreIfMissing()
Do not throw an exception when .env is missing
|
Dotenv |
load()
Load the contents of .env into the virtual environment
|
DotenvBuilder |
systemProperties()
Adds environment variables into system properties
|
@NotNull public DotenvBuilder directory(@NotNull java.lang.String path)
Sets the directory containing the .env file
path - The path@NotNull public DotenvBuilder filename(@NotNull java.lang.String name)
Sets the name of the .env file. The default is .env
name - The filename@NotNull public DotenvBuilder ignoreIfMissing()
Do not throw an exception when .env is missing
@NotNull public DotenvBuilder ignoreIfMalformed()
Do not throw an exception when .env is malformed
@NotNull public DotenvBuilder systemProperties()
Adds environment variables into system properties
@NotNull public Dotenv load()
Load the contents of .env into the virtual environment