20.业务架构分析工具 plantuml

发布时间 2024-01-01 11:31:32作者: 想要暴富的小男孩

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