try {
File directory = new File(".");
String proPath = directory.getCanonicalPath();
System.out.println(proPath+"\\resources\\smsContent.properties");
InputStream in = new BufferedInputStream(new FileInputStream(proPath+"\\resources\\smsContent.properties"));
Properties p = new Properties();
p.load(in);
System.out.println(p.getProperty("smsContent"));
in.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
java读取properties配置文件
最新推荐文章于 2016-06-29 09:46:20 发布