Class DotenvPropertySource
java.lang.Object
org.apache.juneau.commons.settings.DotenvPropertySource
- All Implemented Interfaces:
PropertySource
Property source backed by a dotenv file.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor with default path discovery.DotenvPropertySource(Path path) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns a property in this property source.
-
Constructor Details
-
DotenvPropertySource
public DotenvPropertySource()Constructor with default path discovery. -
DotenvPropertySource
Constructor.- Parameters:
path- Dotenv path. Can benull , in which case no properties are loaded.
-
-
Method Details
-
get
Description copied from interface:PropertySourceReturns a property in this property source.- Specified by:
getin interfacePropertySource- Parameters:
name- The property name.- Returns:
- The property lookup result:
PropertyLookupResult.missing()if this source does not define the key.PropertyLookupResult.present(Optional)withOptional.empty()if the key exists with a null value.PropertyLookupResult.present(Optional)with a value if the key exists with a non-null value.
-