标签:
public static String getProperty(String key){ InputStream in = PropertiesUtils.class.getResourceAsStream("/conf.properties"); Properties properties = new Properties(); String value; try { properties.load(in); value = properties.getProperty(key); in.close(); return value; } catch (IOException e) { e.printStackTrace(); } return null; }
Java获取.properties配置文件某一项value根据key值
标签:
原文地址:http://www.cnblogs.com/dreamzhiya/p/4832561.html