1.src下,属性文件oracleaddstatu.properties;

java读取属性文件properties里key的值

 

 2. 使用JAVA工具类--->import java.util.ResourceBundle

(补充:.properties少些了一个i,然后运行一直是找不到文件(注意属性文件后缀名称,要写对))

ResourceBundle bundle = ResourceBundle.getBundle("oracleaddstatu");

String orclestate = bundle.getString("orclestate");

相关文章:

  • 2022-12-23
  • 2022-02-08
  • 2021-09-21
  • 2022-01-12
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
猜你喜欢
  • 2022-12-23
  • 2022-02-11
  • 2022-01-26
  • 2022-12-23
  • 2021-11-13
  • 2021-06-23
  • 2022-12-23
相关资源
相似解决方案