diff --git a/samples/demo01.md b/samples/demo01.md index 847c94a..7e64908 100644 --- a/samples/demo01.md +++ b/samples/demo01.md @@ -9,6 +9,16 @@ export_on_save: [TOC] +# Plantuml + +```plantuml + Alice -> Bob: Authentication Request + Bob --> Alice: Authentication Response + + Alice -> Bob: Another authentication Request + Alice <-- Bob: Another authentication Response +``` + # 时序图 ```plantuml @@ -26,6 +36,23 @@ export_on_save: 其他服务 -> 用户: 信息test @enduml ``` +# 时序图1 +```uml +@startuml + +!include https://deep-tek.com/puml/core.puml + +用户 -> 认证中心: 登录操作 +认证中心 -> 缓存: 存放(key=token+ip,value=token)token + +用户 <- 认证中心 : 认证成功返回token +用户 -> 认证中心: 下次访问头部携带token认证 +认证中心 <- 缓存: key=token+ip获取token +其他服务 <- 认证中心: 存在且校验成功则跳转到用户请求的其他服务 +其他服务 -> 用户: 信息test +@enduml +``` + # 时序图-相对路径1 ```plantuml @@ -168,4 +195,4 @@ mindmapDiagram { --- test -- test2 @endmindmap -``` \ No newline at end of file +``` diff --git a/samples/demo02.md b/samples/demo02.md index 7d79c83..266bd38 100644 --- a/samples/demo02.md +++ b/samples/demo02.md @@ -1,10 +1,8 @@ --- puppeteer: - landscape: false - format: "A4" - timeout: 3000 -export_on_save: - puppeteer: true +landscape: false format: "A4" +timeout: 3000 export_on_save: +puppeteer: true --- # 时序图 @@ -19,4 +17,22 @@ GitLab -> Tomcat: Hello, my name is GitLab Tomcat -> GitLab: Nice to meet you. Tomcat <-- GitLab: Nice to meet you too. @enduml - ``` \ No newline at end of file + ``` + +# 引入模块 + +```plantuml +@startuml +!include + +Person(personAlias, "Label", "Optional Description") +Container(containerAlias, "Label", "Technology", "Optional Description") +System(systemAlias, "Label", "Optional Description") + +System_Ext(extSystemAlias, "Label", "Optional Description") + +Rel(personAlias, containerAlias, "Label", "Optional Technology") + +Rel_U(systemAlias, extSystemAlias, "Label", "Optional Technology") +@enduml +```