四步:
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