Springboot杂七杂八

1 加载配置文件

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

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

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

猜你喜欢

转载自www.cnblogs.com/domi22/p/9569794.html