1 加载配置文件

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

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

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

 

相关文章:

  • 2021-05-28
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2021-10-18
  • 2021-08-27
  • 2021-06-09
  • 2021-11-10
猜你喜欢
  • 2021-11-07
  • 2021-08-27
相关资源
相似解决方案