properties文件 : email_sz.properties
JAVA 代码
InputStream in = ReagUsingControl.class.getClassLoader().getResourceAsStream("email_sz.properties");
Properties p = new Properties();
p.load(in);
String revs = (String) p.get("adress.produce_on.density_on_changeReag");
//System.out.println(revs);
这只是取值的 其中一种方法。
InputStream in = Object.class.getClassLoader().getResourceAsStream("email_sz.properties");
// InputStream in = Object.class.getResourceAsStream("/email_sz.properties");
Properties p = new Properties();
p.load(in);
String revs = (String) p.get("adress.produce_on.density_on_changeReag");
//System.out.println(revs);