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

public class PropertiesUtil {
	
	/**
	 * 通过key获得配置的值
	 * 
	 * @param key
	 * @return
	 */
	public static String getProps(String key) {
		Properties props = new Properties();
		try {
			// 获取项目的相对路径
			InputStream in = PropertiesUtil.class
					.getResourceAsStream("/app.properties");
			props.load(in);
			in.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return props.getProperty(key);
	}
	
	
	public static String getAlipay(String key){
		Properties props = new Properties();
		try {
			InputStream in = PropertiesUtil.class
					.getResourceAsStream("/alipay.properties");
			props.load(in);
			in.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return props.getProperty(key);
	}
	
}
最近下载更多
wx19941125  LV12 2019年8月19日
123456dian  LV6 2019年7月30日
安安an  LV17 2019年4月3日
oldfox  LV18 2018年10月10日
yr940115  LV12 2018年9月10日
故事_sun  LV26 2018年9月5日
bosimao1988512  LV3 2018年7月4日
shenter  LV2 2018年6月1日
jic499  LV27 2018年4月18日
shanshilong  LV19 2018年4月12日
最近浏览更多
xsxtxbb  LV8 2022年10月10日
00044304  LV6 2022年9月17日
lsq54365  LV14 2021年7月9日
忘川秋叶丶  LV3 2021年5月28日
judy0971  LV12 2021年3月1日
dongzhan  LV12 2020年12月22日
penghao_110  LV2 2020年5月29日
yyy0502 2020年4月18日
暂无贡献等级
amour  LV7 2020年3月15日
liu281337084  LV2 2019年12月24日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友