Springboot杂七杂八

1 加载配置文件

private static ResourceBundle resb = ResourceBundle.getBundle("serverInfo");

然后在resource下面写serverInfo.properties文件就可以加载了,然后是使用

String key = bundle.getString(api.path.myid);

 

posted @ 2018-09-01 12:03  老人与JAVA  阅读(144)  评论(0编辑  收藏  举报