From a5eb49ab6efa6d7ab0631be9d8d4f9fe2f4a88a2 Mon Sep 17 00:00:00 2001 From: tanghc Date: Sat, 23 Mar 2019 18:08:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E5=86=99=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- doc/docs/_sidebar.md | 8 ++++---- doc/src/main/java/com/gitee/sop/doc/SidebarTest.java | 10 +++++++++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 266a929c..c486154d 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ SOP封装了开放平台大部分功能包括:签名验证、统一异常处 ## 相关文档 -待完善 +[开发文档](http://durcframework.gitee.io/sop) ## 沟通交流 diff --git a/doc/docs/_sidebar.md b/doc/docs/_sidebar.md index 965e5749..8728cf44 100644 --- a/doc/docs/_sidebar.md +++ b/doc/docs/_sidebar.md @@ -1,6 +1,6 @@ * 文档目录 - * [错误处理](files/1004_错误处理.md?t=1553335182242) - * [新增接口](files/1002_新增接口.md?t=1553335182268) - * [快速体验](files/1001_快速体验.md?t=1553335182268) - * [业务参数校验](files/1003_业务参数校验.md?t=1553335182268) + * [快速体验](files/1001_快速体验.md?t=1553335685610) + * [新增接口](files/1002_新增接口.md?t=1553335685628) + * [业务参数校验](files/1003_业务参数校验.md?t=1553335685628) + * [错误处理](files/1004_错误处理.md?t=1553335685628) diff --git a/doc/src/main/java/com/gitee/sop/doc/SidebarTest.java b/doc/src/main/java/com/gitee/sop/doc/SidebarTest.java index 2994bb25..1ab8dae0 100644 --- a/doc/src/main/java/com/gitee/sop/doc/SidebarTest.java +++ b/doc/src/main/java/com/gitee/sop/doc/SidebarTest.java @@ -2,6 +2,10 @@ package com.gitee.sop.doc; import java.io.File; import java.io.FileOutputStream; +import java.util.Comparator; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; /** * 生成_sidebar.md文件,直接运行即可 @@ -18,8 +22,12 @@ public class SidebarTest { String fileDir = root + "/docs/files"; File dir = new File(fileDir); File[] files = dir.listFiles(); + Stream filesStream = Stream.of(files); + List fileList = filesStream + .sorted(Comparator.comparing(File::getName)) + .collect(Collectors.toList()); StringBuilder output = new StringBuilder(); - for (File file : files) { + for (File file : fileList) { String filename = file.getName(); String title = filename.substring(filename.indexOf("_") + 1, filename.length() - 3); String line = String.format(format, title, filename, System.currentTimeMillis());