package com.infotech.common.util;

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

/**
 * @ClassName Confkit.java
 * @Description TODO
 *
 * @author D.C
 * @version V1.0
 * @CreateDate 2017年7月5日 下午3:29:05
 *
 */
public class Confkit {
	
	private static Properties props = new Properties();

	static {
		try {
			props.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("conf.properties"));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static String get(String key) {
		return props.getProperty(key);
	}

    public static void setProps(Properties p){
        props = p;
    }
}

  

posted on 2019-10-14 11:49  大黑.的博客  阅读(71)  评论(0编辑  收藏  举报