Example .env file:
key1=value1
key2="value2"
key3='value3'
Usage code:
Dotenv dotenv = Dotenv.load();
System.out.println(dotenv.get("key1"));
System.out.println(dotenv.get("key2"));
System.out.println(dotenv.get("key3"));
Output:
The single quotes around value3 were not removed.
Example
.envfile:Usage code:
Output:
The single quotes around value3 were not removed.