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
相关推荐
Ysx31 分钟前
AI 问答不再"一本正经地胡说":30 轮提示词迭代,沉淀 4 条防幻觉铁律
设计模式
码匠许师傅1 小时前
【设计模式精讲】25.状态模式(State)
c++·ui·设计模式·状态模式·uml
geovindu4 小时前
java:Observer Pattern
java·开发语言·后端·观察者模式·设计模式·行为模式
码匠许师傅1 天前
【设计模式精讲】24.观察者模式(Observer)
c++·观察者模式·设计模式·uml
小程故事多_801 天前
从快速迭代到稳定存续,Google五大设计模式重构长效AI智能体落地逻辑
人工智能·设计模式·重构
码匠许师傅2 天前
【设计模式精讲】22.中介者模式(Mediator)
c++·设计模式·软件工程·uml·中介者模式
2401_868534782 天前
网规备考_2.4 路由协议
c++·设计模式
cpp_learner2 天前
C++ 实现责任链模式(Chain of Responsibility):从一堆 if-else 到可插拔的处理管道
c++·设计模式
码匠许师傅2 天前
【设计模式精讲】23.备忘录模式(Memento)
c++·设计模式·软件工程·uml·备忘录模式
新知图书3 天前
第8章 多智能体协同
人工智能·设计模式·智能体