Properties pps=new Properties();
try {
pps.load(new FileInputStream("src/email.properties"));
Enumeration enum1 = pps.propertyNames();
while (enum1.hasMoreElements()) {
String strKey = (String) enum1.nextElement();
String strValue = pps.getProperty(strKey);
System.out.println(strKey + "=" + strValue);
}
} catch (Exception e) {
e.printStackTrace();
}
时间: 2024-11-05 21:50:12