Package me.paulschwarz.springdotenv
Class DotenvPropertySource
- java.lang.Object
-
- org.springframework.core.env.PropertySource<DotenvPropertyLoader>
-
- me.paulschwarz.springdotenv.DotenvPropertySource
-
public class DotenvPropertySource extends org.springframework.core.env.PropertySource<DotenvPropertyLoader>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDOTENV_PROPERTY_SOURCE_NAMEName of the envPropertySource.
-
Constructor Summary
Constructors Constructor Description DotenvPropertySource(java.lang.String name, DotenvConfig dotenvConfig)DotenvPropertySource(DotenvConfig dotenvConfig)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddToEnvironment(org.springframework.core.env.ConfigurableEnvironment environment)java.lang.ObjectgetProperty(java.lang.String name)Return the value associated with the given name, ornullif not found.
-
-
-
Field Detail
-
DOTENV_PROPERTY_SOURCE_NAME
public static final java.lang.String DOTENV_PROPERTY_SOURCE_NAME
Name of the envPropertySource.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DotenvPropertySource
public DotenvPropertySource(java.lang.String name, DotenvConfig dotenvConfig)
-
DotenvPropertySource
public DotenvPropertySource(DotenvConfig dotenvConfig)
-
-
Method Detail
-
getProperty
public java.lang.Object getProperty(java.lang.String name)
Return the value associated with the given name, ornullif not found.- Specified by:
getPropertyin classorg.springframework.core.env.PropertySource<DotenvPropertyLoader>- Parameters:
name- the property to find- See Also:
PropertyResolver.getRequiredProperty(String)
-
addToEnvironment
public static void addToEnvironment(org.springframework.core.env.ConfigurableEnvironment environment)
-
-