config.properties配置文件:
#参数
param=xxx
username=xxx
password=xxxxxxx
getUrl=xxx
-----------------------------------------------------------------
测试代码:
package com.xxx.client;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class ReadProperties {
public static void main(String[] args) throws IOException {
Properties properties = new Properties();
// 使用ClassLoader加载properties配置文件生成对应的输入流
InputStream in = HttpRequestUtils.class.getClassLoader().getResourceAsStream("config.properties");
// 使用properties对象加载输入流
properties.load(in);
// 获取key对应的value值
String pro