标签:
public class PropertiesUtil { public static String get(String filePath, String key) { String val = null; Properties prop = new Properties(); InputStream in = null; in = PropertiesUtil.class.getClassLoader().getResourceAsStream(filePath); try { prop.load(in); val = (String) prop.get(key); } catch (IOException e) { e.printStackTrace(); } try { in.close(); } catch (IOException e) { e.printStackTrace(); } return val; } }
标签:
原文地址:http://www.cnblogs.com/windyWu/p/5982173.html