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());