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

io.getunleash.util.UnleashProperties Maven / Gradle / Ivy

There is a newer version: 9.2.4
Show newest version
package io.getunleash.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class UnleashProperties {
    static Properties appProperties;

    static {
        try (InputStream is =
                UnleashProperties.class.getClassLoader().getResourceAsStream("app.properties")) {
            appProperties = new Properties();
            appProperties.load(is);
        } catch (IOException ioException) {
            appProperties = new Properties();
            appProperties.setProperty("client.specification.version", "4.2.0");
        }
    }

    public static String getProperty(String propName) {
        return appProperties.getProperty(propName);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy