Googler

两情相悦,又岂在朝朝暮暮。

java readProperties

@Deprecated
public static Map<String, String> readProperties(String propertiesFile) {
    Properties prop = new Properties();
    try {
        prop.load(new InputStreamReader(
                App.class.getClassLoader().getResourceAsStream(propertiesFile + ".properties"), UTF8));
    } catch (Exception ex) {
        throw SystemException.wrap(ex);
    }

    Map<String, String> map = new HashMap<>();
    for (String key : prop.stringPropertyNames()) {
        map.put(key, isNull(prop.getProperty(key), ""));
    }
    return map;
}

 

posted on 2017-09-29 16:52  RockyLOMO  阅读(242)  评论(0编辑  收藏  举报

导航

Apple/苹果笔记本 Mac Air MC968CH/A 行货在保 I5 11寸 超级本