PlantUML模版
2024/8/28大约 3 分钟
序列图
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
@enduml用例图
@startuml
:User: --> (Use)
"Main Admin" as Admin
"Use the application" as (Use)
Admin --> (Admin the application)
@enduml类图
@startuml
abstract abstract
abstract class "abstract class"
annotation annotation
circle circle
() circle_short_form
class class
diamond diamond
<> diamond_short_form
entity entity
enum enum
interface interface
protocol protocol
struct struct
@enduml对象图
@startuml
object Object01
object Object02
object Object03
object Object04
object Object05
object Object06
object Object07
object Object08
Object01 <|-- Object02
Object03 *-- Object04
Object05 o-- "4" Object06
Object07 .. Object08 : some labels
@enduml活动图
@startuml
start
if (Graphviz installed?) then (yes)
:process all
diagrams;
else (no)
:process only
__sequence__ and __activity__ diagrams;
endif
stop
@enduml组件图
@startuml
[First component]
[Another component] as Comp2
component Comp3
component [Last component] as Comp4
@enduml部署图
@startuml
node node1
node node2
node node3
node node4
node node5
node1 -- node2 : label1
node1 .. node3 : label2
node1 ~~ node4 : label3
node1 == node5
@enduml状态图
@startuml
[*] --> State1
State1 --> [*]
State1 : this is a string
State1 : this is another string
State1 -> State2
State2 --> [*]
@enduml时序图
@startuml
robust "Web Browser" as WB
concise "Web User" as WU
@0
WU is Idle
WB is Idle
@100
WU is Waiting
WB is Processing
@300
WB is Waiting
@enduml脑图
@startmindmap
* 一级
* 二级
* 三级
* 二级
* 二级
*[#Orange] Colors
**[#lightgreen] Green
**[#FFBBCC] Rose
**[#lightblue] Blue
<style>
mindmapDiagram {
.green {
BackgroundColor lightgreen
}
.rose {
BackgroundColor #FFBBCC
}
.your_style_name {
BackgroundColor lightblue
} }
</style>
* Colors
** Green <<green>>
** Rose <<rose>>
** Blue <<your_style_name>>
@endmindmap活动图
开始/结束
@startuml
start
end
stop
@enduml节点
@startuml
:节点;
@enduml条件
@startuml
start
if(条件1?) then(yes)
:节点1;
elseif(条件2?) then(yes)
:节点2;
else(no)
:节点3;
endif
stop
@enduml循环
@startuml
start
repeat
:节点;
repeat while (more data?)
stop
start
repeat :节点1;
:节点2;
backward:节点3;
repeat while (more data?)
stop
@enduml备注
@startuml
:节点;
note left
左边备注
end note
note right
右边备注
end note
@enduml