public static String getPath() {
String path = "";
Properties prop = new Properties();
try {
InputStream in = ImageURL.class.getClassLoader().getResourceAsStream("jdbc.properties");
prop.load(in);
path = prop.getProperty("admin.path");
in.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return path;
}
获取 .properties 配置文件中的值
最新推荐文章于 2020-05-13 08:47:28 发布