目录存放

在web文件夹下创建resources文件夹,并右击选择Mark Directory as - Resources Root
IDEA在完成JavaWeb时,有关properties等配置文件的问题
在该文件夹下存放的properties配置文件会在Tomcat部署之后自动输出到out文件夹,在使用servletContext.getRealPath方法时传入的参数为“resources/文件名.properties”,从而找到配置文件

相关文章:

  • 2021-12-26
  • 2021-09-06
  • 2021-10-19
  • 2022-01-07
  • 2021-06-16
  • 2021-10-04
  • 2021-05-12
猜你喜欢
  • 2021-08-25
  • 2021-11-17
  • 2021-05-01
  • 2021-06-29
  • 2021-08-01
  • 2022-12-23
相关资源
相似解决方案