获取ApplicationResources.properties配置文件的值

/*
* 从配置ApplicationResources.properties获取文件jfDsFtpGtgsPath存取路径
*/
public String getApplicationResourcesByKey(String properties,String key){
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(properties);
Properties props = new Properties();
try {
props.load(inputStream);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String vl=props.getProperty(key);

return vl;
}
原文地址:https://www.cnblogs.com/fangj/p/2232863.html