1  ServletContext context = request.getServletContext();
2         String path = context.getRealPath("/WEB-INF/classes/jdbc.properties");
3         System.out.println("path"+path);
4         Properties pro = new Properties();
5         pro.load(new FileReader(path));
6         System.out.println("jdbc.url:"+pro.get("jdbc.url"));
View Code

相关文章:

  • 2021-10-30
  • 2022-12-23
  • 2022-02-04
  • 2021-12-12
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-26
  • 2022-12-23
  • 2021-08-17
  • 2022-12-23
  • 2021-12-02
  • 2022-12-23
  • 2021-07-19
相关资源
相似解决方案