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 LV19
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日

最近浏览