public static String getProperty(String resource,String key){
String properties_active = System.getProperty("properties_active");
String resourceClasspath="/config/"+properties_active+resource+".properties";
InputStream inputStream=CommonUtil.class.getResourceAsStream(resourceClasspath);
Properties properties = new Properties();
try {
properties.load(inputStream);
inputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
return properties.getProperty(key);
}
String properties_active = System.getProperty("properties_active");
String resourceClasspath="/config/"+properties_active+resource+".properties";
InputStream inputStream=CommonUtil.class.getResourceAsStream(resourceClasspath);
Properties properties = new Properties();
try {
properties.load(inputStream);
inputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
return properties.getProperty(key);
}