/**
* 读取配置文件
*
*/
public class ConfigInfo {
private static Properties cache1 = new Properties();
static{
try {
cache1.load(ConfigInfo.class.getClassLoader().getResourceAsStream("merchantInfo.properties"));
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 获取指定key的值
* @param key
* @return
*/
public static String getValue(String key){
return cache.getProperty(key);
}
private static ResourceBundle cache = null;
static{
cache = ResourceBundle.getBundle("merchantInfo");
}
public static String getValue(String key){
return cache.getString(key);
}
}