等峰也等你

博客园 首页 新随笔 联系 订阅 管理

plantuml 介绍

 
  • UML:统一建模语言
  • plantuml:第三方插件工具
  • plantuml 官网:https://plantuml.com/zh/
  • plantuml 中文文档:https://ceshiren.com/t/topic/4530
  • plantuml 在线绘图地址:https://plantuml.ceshiren.com/

时序图

 
@startuml
Alice -> Bob: Hi Bob
Bob --> Alice: Hi Alice

Alice -> Bob: how are you?
Alice <-- Bob: Fine,thanks.
@enduml
@startuml
Alice -> Bob: Hi Bob
Bob --> Alice: Hi Alice

Alice -> Bob: how are you?
Alice <-- Bob: Fine,thanks.
@enduml

时序图常用关键字

 
  • 声明对象:actor database
  • 消息数字序号:autonumber
  • 消息分组:alt/else/end

用例图

 
@startuml
left to right direction
skinparam packageStyle rectangle
actor customer
actor clerk
rectangle checkout {
  customer -- (checkout) 
  (checkout) .> (payment) : include 
  (help) .> (checkout) : extends
  (checkout) -- clerk
}
@enduml
@startuml
left to right direction
skinparam packageStyle rectangle
actor customer
actor clerk
rectangle checkout {
  customer -- (checkout) 
  (checkout) .> (payment) : include 
  (help) .> (checkout) : extends
  (checkout) -- clerk
}
@enduml

活动图

 
@startuml

start
repeat
  :read data;
  :generate diagrams;
repeat while (more data?)
stop

@enduml
@startuml

start
repeat
  :read data;
  :generate diagrams;
repeat while (more data?)
stop

@enduml

思维导图

 
@startmindmap
* 根节点
    * 第一级子节点 1
        * 第二级子节点 1
        * 第二级子节点 2
    * 第一级子节点 2
@endmindmap
@startmindmap
scale 10
* 根节点
** 第一级子节点 1
** 第二级子节点 1
** 第二级子节点 2
** 第一级子节点 2
@endmindmap
posted on 2024-01-01 11:28  等峰也等你  阅读(29)  评论(0编辑  收藏  举报