zoukankan      html  css  js  c++  java
  • java读取资源文件(Properties)

    四步:

    java代码

    //new一个读取配置文件
            Properties properties=new Properties();
            //获取文件路径
            String path=request.getServletContext().getRealPath("/dom.properties");
            //读取文件内容
            properties.load(new FileInputStream(path));
            //获取origin的value
            String origin=properties.getProperty("origin");

    配置文件代码

    origin=http://localhost:7070, http://localhost:8080, http://localhost:9090

  • 相关阅读:
    http
    VUE-1
    AJAX
    html常用标签
    CSS网页布局
    概念整理3
    SEO
    概念整理2
    var
    概念整理
  • 原文地址:https://www.cnblogs.com/weibanggang/p/10025382.html
Copyright © 2011-2022 走看看