package com.bbd.utils;

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

/**
 * @author 臧涛
 */
public class PropertiesUtil {

    private PropertiesUtil() {
    }

    private static Properties properties = null;

    public static Properties getProperties() {

        if (properties == null) {
            try {
                Properties properties = new Properties();
                InputStream in = PropertiesUtil.class.getClassLoader().getResourceAsStream("global.properties");
                properties.load(in);
                return properties;
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return properties;
    }


}
