Java获取.properties配置文件某一项value根据key值

    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;
}
上一篇:css3滚动效果


下一篇:jquery的$post方法不发送空数组的解决办法