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
相关推荐
Meteors.4 小时前
23种设计模式——访问者模式 (Visitor Pattern)
设计模式·访问者模式
Vallelonga4 小时前
Rust 设计模式 Marker Trait + Blanket Implementation
开发语言·设计模式·rust
en-route5 小时前
设计模式的底层原理——解耦
设计模式
杯莫停丶5 小时前
设计模式之:工厂方法模式
设计模式·工厂方法模式
Deschen5 小时前
设计模式-抽象工厂模式
java·设计模式·抽象工厂模式
粘豆煮包6 小时前
系统设计 System Design -4-2-系统设计问题-设计类似 TinyURL 的 URL 缩短服务 (改进版)
设计模式·架构
top_designer7 小时前
告别“静态”VI手册:InDesign与AE打造可交互的动态品牌规范
设计模式·pdf·交互·vi·工作流·after effects·indesign
非凡的世界8 小时前
深入理解 PHP 框架里的设计模式
开发语言·设计模式·php
一叶飘零_sweeeet9 小时前
深入 Spring 内核:解密 15 种设计模式的实战应用与底层实现
java·spring·设计模式
Mr_WangAndy9 小时前
C++设计模式_行为型模式_状态模式State
c++·设计模式·状态模式