Commit 7e347f02 authored by June's avatar June

v3- fix bug

parent 2974b9d9
...@@ -5,6 +5,7 @@ import com.june.entitytodbdoc.utils.FileUtils; ...@@ -5,6 +5,7 @@ import com.june.entitytodbdoc.utils.FileUtils;
import com.june.entitytodbdoc.utils.GetClassCommentUtils; import com.june.entitytodbdoc.utils.GetClassCommentUtils;
import com.june.entitytodbdoc.utils.MarkdownUtils; import com.june.entitytodbdoc.utils.MarkdownUtils;
import java.util.Collection;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
...@@ -29,7 +30,8 @@ public class Starter { ...@@ -29,7 +30,8 @@ public class Starter {
.map(Optional::get) .map(Optional::get)
.distinct() .distinct()
.sorted(Comparator.comparing(DocumentInfoDTO::getDocumentName)) .sorted(Comparator.comparing(DocumentInfoDTO::getDocumentName))
.flatMap(dto -> MarkdownUtils.getOneDocumentContent(dto).stream()) .map(MarkdownUtils::getOneDocumentContent)
.flatMap(Collection::stream)
.collect(Collectors.toList()); .collect(Collectors.toList());
String path = "D:\\work\\idea\\june\\entity-to-db-doc\\entity-to-db-doc\\src\\main\\java\\com\\june\\entitytodbdoc\\xx.md"; String path = "D:\\work\\idea\\june\\entity-to-db-doc\\entity-to-db-doc\\src\\main\\java\\com\\june\\entitytodbdoc\\xx.md";
FileUtils.writeMarkdown(resultContentList, path); FileUtils.writeMarkdown(resultContentList, path);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment