diff --git a/structurizr-export/src/main/java/com/structurizr/export/AbstractDiagramExporter.java b/structurizr-export/src/main/java/com/structurizr/export/AbstractDiagramExporter.java index 56cef170..cab2c6f7 100644 --- a/structurizr-export/src/main/java/com/structurizr/export/AbstractDiagramExporter.java +++ b/structurizr-export/src/main/java/com/structurizr/export/AbstractDiagramExporter.java @@ -26,7 +26,7 @@ public final Collection export(Workspace workspace) { throw new IllegalArgumentException("A workspace must be provided."); } - Collection diagrams = new ArrayList<>(); + Collection diagrams = new ArrayList<>() ; for (CustomView view : workspace.getViews().getCustomViews()) { Diagram diagram = export(view); diff --git a/structurizr-export/src/main/java/com/structurizr/export/plantuml/StructurizrPlantUMLExporter.java b/structurizr-export/src/main/java/com/structurizr/export/plantuml/StructurizrPlantUMLExporter.java index 2c8d3c77..4836fd24 100644 --- a/structurizr-export/src/main/java/com/structurizr/export/plantuml/StructurizrPlantUMLExporter.java +++ b/structurizr-export/src/main/java/com/structurizr/export/plantuml/StructurizrPlantUMLExporter.java @@ -425,13 +425,14 @@ protected void writeRelationship(ModelView view, RelationshipView relationshipVi } writer.writeLine( - String.format("%s %s[%s]%s %s : %s", + String.format("%s %s[%s]%s %s : %s%s", idOf(relationship.getSource()), arrowStart, style.getColor(), arrowEnd, idOf(relationship.getDestination()), - description)); + description, + (StringUtils.isNullOrEmpty(technology) ? "" : "\\n[" + technology + "]"))); } else { boolean solid = style.getStyle() == LineStyle.Solid || false == style.getDashed(); diff --git a/structurizr-export/src/test/java/com/structurizr/export/plantuml/structurizr/36141-SignIn-sequence.puml b/structurizr-export/src/test/java/com/structurizr/export/plantuml/structurizr/36141-SignIn-sequence.puml index eb84e809..2f188f4c 100644 --- a/structurizr-export/src/test/java/com/structurizr/export/plantuml/structurizr/36141-SignIn-sequence.puml +++ b/structurizr-export/src/test/java/com/structurizr/export/plantuml/structurizr/36141-SignIn-sequence.puml @@ -40,10 +40,10 @@ participant "Single-Page Application\n[Container: JavaScript and Angula participant "Sign In Controller\n[Component: Spring MVC Rest Controller]" as InternetBankingSystem.APIApplication.SignInController <> #85bbf0 participant "Security Component\n[Component: Spring Bean]" as InternetBankingSystem.APIApplication.SecurityComponent <> #85bbf0 database "Database\n[Container: Oracle Database Schema]" as InternetBankingSystem.Database <> #438dd5 -InternetBankingSystem.SinglePageApplication -[#707070]> InternetBankingSystem.APIApplication.SignInController : Submits credentials to +InternetBankingSystem.SinglePageApplication -[#707070]> InternetBankingSystem.APIApplication.SignInController : Submits credentials to\n[JSON/HTTPS] InternetBankingSystem.APIApplication.SignInController -[#707070]> InternetBankingSystem.APIApplication.SecurityComponent : Validates credentials using -InternetBankingSystem.APIApplication.SecurityComponent -[#707070]> InternetBankingSystem.Database : select * from users where username = ? -InternetBankingSystem.APIApplication.SecurityComponent <-[#707070]- InternetBankingSystem.Database : Returns user data to +InternetBankingSystem.APIApplication.SecurityComponent -[#707070]> InternetBankingSystem.Database : select * from users where username = ?\n[SQL/TCP] +InternetBankingSystem.APIApplication.SecurityComponent <-[#707070]- InternetBankingSystem.Database : Returns user data to\n[SQL/TCP] InternetBankingSystem.APIApplication.SignInController <-[#707070]- InternetBankingSystem.APIApplication.SecurityComponent : Returns true if the hashed password matches -InternetBankingSystem.SinglePageApplication <-[#707070]- InternetBankingSystem.APIApplication.SignInController : Sends back an authentication token to +InternetBankingSystem.SinglePageApplication <-[#707070]- InternetBankingSystem.APIApplication.SignInController : Sends back an authentication token to\n[JSON/HTTPS] @enduml \ No newline at end of file