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

com.networknt.aws.lambda.Configuration Maven / Gradle / Ivy

The newest version!
package com.networknt.aws.lambda;

import org.yaml.snakeyaml.Yaml;

import java.io.InputStream;
import java.util.Map;

public class Configuration {
    private final Yaml yaml = new Yaml();
    private Map> config;
    private static Configuration INSTANCE = new Configuration();

    public static Configuration getInstance() {
        return INSTANCE;
    }

    private Configuration() {
        load();
    }

    private void load() {
        InputStream inputStream = Configuration.class.getClassLoader().getResourceAsStream("app.yml");
        config = yaml.load(inputStream);
    }

    public Map getStageConfig(String env) {
        return config.get(env);
    }
    public Map> getConfig() { return config; }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy