参考:Java 读写Properties配置文件
    Properties属性

    1. @Test
    2. void testRedis() throws IOException {
    3. Properties properties = new Properties();
    4. properties.put("webSet", webSet);
    5. //创建一个目录对象
    6. File dir = new File("tjconfig");
    7. //如果目录不存在,则创建目录
    8. if (!dir.exists()) dir.mkdirs();
    9. /**
    10. * 参数1:保存管道 字符输出流管道
    11. * 参数2:保存心得
    12. */
    13. properties.store(new FileWriter("tjconfig/webset.properties"), "");
    14. }