All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.keycloak.util.SystemEnvProperties Maven / Gradle / Ivy

There is a newer version: 26.1.4
Show newest version
package org.keycloak.util;

import java.util.Properties;

/**
 * @author Stian Thorgersen
 */
public class SystemEnvProperties extends Properties {

    @Override
    public String getProperty(String key) {
        if (key.startsWith("env.")) {
            return System.getenv().get(key.substring(4));
        } else {
            return System.getProperty(key);
        }
    }

    @Override
    public String getProperty(String key, String defaultValue) {
        String value = getProperty(key);
        return value != null ? value : defaultValue;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy