参考:Java 读写Properties配置文件
Properties属性
@Test
void testRedis() throws IOException {
Properties properties = new Properties();
properties.put("webSet", webSet);
//创建一个目录对象
File dir = new File("tjconfig");
//如果目录不存在,则创建目录
if (!dir.exists()) dir.mkdirs();
/**
* 参数1:保存管道 字符输出流管道
* 参数2:保存心得
*/
properties.store(new FileWriter("tjconfig/webset.properties"), "");
}