在类文件中加入代码:
//config.properties.sysInfo //sysInfo.properties在文件夹的路径为/src/config/properties/sysInfo.properties ResourceBundle bundle = ResourceBundle.getBundle("config.properties.sysInfo"); //keyName为配置文件的key名称 String value = bundle.getString("keyName"); //value为keyName对应的值
亲测好使。。。