第一种,读取文件为properties文件:
test.url=http://localhost:8888
private static ResourceBundle bundle=ResourceBundle.getBundle("application", Locale.CHINA);
String address=bundle.getString("test.url");
第二种:
public Properties
第一种,读取文件为properties文件:
test.url=http://localhost:8888
private static ResourceBundle bundle=ResourceBundle.getBundle("application", Locale.CHINA);
String address=bundle.getString("test.url");
第二种:
public Properties