小编Sar*_*h N的帖子

certbot和certbot-auto之间的区别

我正在使用letsencrypt我的服务器来支持https。环顾四周时,我会发现与certbotcertbot-auto具有相似功能的其他人的命令。您是否需要一贯使用另一个?有人可以解释两者之间的区别,在这种情况下,您将使用每个区别吗?

lets-encrypt certbot

8
推荐指数
1
解决办法
1501
查看次数

Snakeyaml - 如何对流样式进行自定义控制

我正在尝试使用snakeyaml 在java 中创建一个YAML 文件,但无法获得所需的格式。一些子在使用DumperOptions.FlowStyle.BLOCK时格式正确,而其他部分在使用默认时格式正确DumperOptions.FlowStyle.AUTO。这是我的意思的最小示例:

Map<String,Integer> children1 = new LinkedHashMap();
children1.put("Criteria-1", 2);
children1.put("Criteria-2",1);

List<List<Object>> children2 = new ArrayList<>();
List<Object> list = new ArrayList<>();
list.add("Criteria-1");
list.add("Criteria-2");
list.add(new Integer(1));
children2.add(list);

Map<String,Object> map = new LinkedHashMap();
map.put("Version",2.0);
map.put("Parent-1",children1);
map.put("Parent-2",children2);      

//Style 1 - AUTO - Correct format for Parent-2
Yaml yaml1 = new Yaml();
String style1 = yaml1.dump(map);
System.out.println(style1);

//Style 2 - BLOCK - Correct format for Parent-1
DumperOptions options = new DumperOptions();
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
Yaml yaml2 = new Yaml(options);
String style2 …
Run Code Online (Sandbox Code Playgroud)

java yaml snakeyaml

5
推荐指数
1
解决办法
1601
查看次数

标签 统计

certbot ×1

java ×1

lets-encrypt ×1

snakeyaml ×1

yaml ×1