首页 > 解决方案 > 当一个元素属于两组时,UML图中的对象的交集

问题描述

请告诉我如何在此代码中将 [VirtualService] 设为 VS,以便它同时位于“Ingress”组和“Application”组中。事实证明,交集和组件 [VirtualService] 可以在“Ingress”组中,也可以在“Application”中,您需要在那里和那里。请帮忙

@startuml
' Remove shadows
skinparam shadowing false
skinparam BackgroundColor transparent
skinparam componentStyle rectangle
skinparam roundCorner 15
 
left to right direction
skinparam linetype polyline
skinparam linetype ortho

И3#transparent;line:transparent;text:transparent
rectangle "Кластер OpenShift" #MOTIVATION  {
    component "Точка входа" as TV #white{
[Rout] as ROUT #grey;text:white
И3->ROUT #blue
И3<..ROUT #blue
}
rectangle "OS Namespase" as OS #white {
component Application as PR #LightPink {

[VirtualService] as VS #grey;text:white


[App Service] as AS #grey;text:white
[App\nPod] as AP

}
    
 component Ingress as IG #LightSkyBlue {

 [Ingress\nService] as IS #grey;text:white

[Geteway)] as G #grey;text:white
[Ingress\nPod] as IP
 [VirtualService] as VS #grey;text:white
 }

component Приложение as PR #LightPink {

[VirtualService] as VS #grey;text:white


[App Service] as AS #grey;text:white
[App\nPod] as AP

}
}
}

ROUT ->IS #blue 
ROUT  <.. IS #blue
IS ->G #blue 
IS <..G #blue

G->IP #blue 
G<..IP #blue

IP->VS #blue 
IP<..VS #blue

VS->AS #blue 
VS<..AS #blue

AS->AP #blue 
AS<..AP #blue



@enduml


在此处输入图像描述

标签: plantuml

解决方案


推荐阅读