Skip to content

hasnat/java-env-properties

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java-env-properties

Maven Central

Add environment variables to java properties.


Merges environment variables to java properties object

Maven

<dependency>
    <groupId>com.github.hasnat</groupId>
    <artifactId>java-env-properties</artifactId>
    <version>1.0.0</version>
</dependency>

Gradle

compile 'com.github.hasnat:java-env-properties:1.0.0'

Usage

// Function Definition
// Properties envToProperties(Map<String, String> envVars, boolean lowerCaseKeys, String envPrefix, Properties mergeToProperties)

Properties props = JavaEnvProperties.envToProperties(
    System.getenv(),
    true,
    "JAVA_ENVS_",
    System.getProperties()
);

// Envs
// JAVA_ENVS_HELLO_THERE=General Kenobi
// Output (Properties)
// hello.there=General Kenobi

Releases

No releases published

Packages

No packages published

Languages