提交 f308578a 作者: 方治民

style: 调整 Swagger 文档日志输出样式

上级 b7248990
...@@ -107,10 +107,10 @@ public class SwaggerConfig implements CommandLineRunner { ...@@ -107,10 +107,10 @@ public class SwaggerConfig implements CommandLineRunner {
Set<String> hosts = new HashSet<>(); Set<String> hosts = new HashSet<>();
hosts.add("localhost"); hosts.add("localhost");
hosts.addAll(NetUtil.localIpv4s()); hosts.addAll(NetUtil.localIpv4s());
String urls = hosts String link = hosts
.stream() .stream()
.map(host -> "> http://" + host + ":" + port + path + "/doc.html") .map(host -> "> http://" + host + ":" + port + path + "/doc.html")
.collect(Collectors.joining("\n\t")); .collect(Collectors.joining("\n\t\t"));
log.info("\n\n📖 API Doc (Swagger2): \n\t{}\n", urls); System.out.println("\n\t📖 API Doc (Swagger2): \n\t\t" + link + "\n");
} }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论