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
相关推荐
七月丶2 天前
别再手动凑 PR 了:这个 AI Skill 会按仓库习惯自动建分支、拆提交、提 PR
人工智能·设计模式·程序员
刀法如飞2 天前
从程序员到架构师:6大编程范式全解析与实践对比
设计模式·系统架构·编程范式
九狼2 天前
Flutter + Riverpod +MVI 架构下的现代状态管理
设计模式
静水流深_沧海一粟2 天前
04 | 别再写几十个参数的构造函数了——建造者模式
设计模式
StarkCoder2 天前
从UIKit到SwiftUI的迁移感悟:数据驱动的革命
设计模式
阿星AI工作室3 天前
给openclaw龙虾造了间像素办公室!实时看它写代码、摸鱼、修bug、写日报,太可爱了吧!
前端·人工智能·设计模式
_哆啦A梦3 天前
Vibe Coding 全栈专业名词清单|设计模式·基础篇(创建型+结构型核心名词)
前端·设计模式·vibecoding
阿闽ooo7 天前
中介者模式打造多人聊天室系统
c++·设计模式·中介者模式
小米4967 天前
js设计模式 --- 工厂模式
设计模式