ServletContext对象读取资源文件以及重定向
摘要:
有两种方式可以读取资源文件 * InputStream getResourceAsStream(String path) 通过文件的地址获取输入流 * String getRealPath(String path) 通过文件的地址获取文件的绝对磁盘路径 步骤: 1. 创建配置文件db.propert 阅读全文
posted @ 2019-06-14 20:02 backend 阅读(312) 评论(0) 推荐(0) 编辑