plantuml用法总结

时序图

参考

plantuml 复制代码
@startuml
skin rose
actor User as user
participant "Component A" as A
participant "Component B" as B
 
user -> A: Request data
activate A
A -> B: Sync Message -> data
activate B
B --> A: Return data
deactivate B
A --> user: Display data
deactivate A
 
user ->> A: Request another data (async)
activate A
A ->> B: Async Message -> another data
activate B
' No return message for async call, so we can leave it as it is or add a note for clarity
note right of B: Processing async request
B -->> A: (hidden,return)
deactivate B
note left of A: Async operation in progress
@enduml
plantuml 复制代码
@startuml
skin rose
title 生命线
participant User

User -> A: DoWork
activate A
A -> B: createRequest >>
activate B
B -> C: DoWork
activate C
C --> B: WorkDone
destroy C
B --> A: RequestCreated
deactivate B
A -> User: Done

deactivate A
@enduml
相关推荐
Leo来编程3 小时前
设计模式1-单例模式
单例模式·设计模式
危险库3 小时前
单例模式:确保一个类只有一个实例【设计模式】
javascript·单例模式·设计模式
已读不回1436 小时前
设计模式-策略模式
前端·算法·设计模式
饕餮争锋11 小时前
设计模式笔记_行为型_访问者模式
笔记·设计模式·访问者模式
写bug写bug1 天前
你真的会用枚举吗
java·后端·设计模式
哆啦code梦1 天前
趣谈设计模式之策略模式-比特咖啡给你一杯满满的情绪价值,让您在数字世界里”畅饮“
设计模式·策略模式
华仔啊1 天前
别学23种了!Java项目中最常用的6个设计模式,附案例
java·后端·设计模式
Keya1 天前
MacOS端口被占用的解决方法
前端·后端·设计模式
已读不回1431 天前
设计模式-单例模式
前端·设计模式
long3162 天前
构建者设计模式 Builder
java·后端·学习·设计模式