java调用Properties文件

来源:互联网 发布:没有网络视听许可证 编辑:程序博客网 时间:2024/04/23 20:18

方法一:

Properties prop ;HttpServletRequest request = ServletActionContext.getRequest(); Stringpath = this.getClass().getClassLoader().getResource("ftp.properties").toURI().getPath();prop = ReadProperties.readProperties(path);prop.getProperty("ftp.ip");

方法二:

0 0