配置文件代码:

读取配置文件参数

 

java代码:

try{
     Properties prop = new Properties(); 
     //读取属性文件horizon.properties
     String params = request.getSession().getServletContext().getRealPath("/")+"WEB-INF\\workflow-conf\\properties\\horizon.properties";
     InputStream in = new BufferedInputStream (new FileInputStream(params));
     prop.load(in);     ///加载属性列表
     String basicVacationDay = prop.getProperty("basicVacationDay");
     String tallestVacationDay = prop.getProperty("tallestVacationDay");
     String base = prop.getProperty("base");
     in.close();
}catch(Exception e){
     e.printStackTrace();
}

 

相关文章:

  • 2022-12-23
  • 2021-12-01
  • 2022-01-15
  • 2022-03-02
  • 2022-12-23
猜你喜欢
  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
相关资源
相似解决方案