读取properties

//db 是文件名为db.properties
private static final ResourceBundle bundle = ResourceBundle.getBundle("db");

 public static String getProperties(String key){

  return bundle.getString(key);

 }

你可能感兴趣的:(读取properties)