架构师之properties-apache的原始类读取属性,最简略
架构师之properties--------------------apache的原始类读取属性,最简单
1.前言。
如题。
2.代码
1.前言。
如题。
2.代码
static String mykey; static { PropertiesConfiguration config = null; try { config = new PropertiesConfiguration("aa.properties"); } catch (ConfigurationException e) { logger.error(e.getMessage(), e); } mykey= config.getString("mykey"); }