You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/spring-petclinic.md
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# The Spring PetClinic example
2
2
3
-
This is a step-by-step guide to recreating the [Spring PetClinic example diagrams](https://structurizr.com/public/1). It assumes that you have working Java, Maven and git installations plus a development environment to write code.
3
+
This is a step-by-step guide to recreating the [Spring PetClinic example diagrams](https://structurizr.com/public/1). It assumes that you have working Java, Maven and git installations plus a development environment to write code. The full source code for this example can be found in the [SpringPetClinic.java file](https://github.com/structurizr/java/blob/master/structurizr-examples/src/com/structurizr/example/spring/petclinic/SpringPetClinic.java).
4
4
5
5
## 1. Clone and build the Spring PetClinic code
6
6
@@ -134,7 +134,7 @@ componentView.addAllPeople();
134
134
componentView.add(relationalDatabase);
135
135
```
136
136
137
-
## 7. Link the components to the source code
137
+
## 7. Linking elements to external resources
138
138
139
139
In order to create a set of maps for the Spring PetClinic system that reflect reality, we can link the components on the component diagram to the source code. This isn't necessary, but doing so means that we can [navigate from the diagrams to the code](https://structurizr.com/help/diagram-navigation).
140
140
@@ -151,6 +151,12 @@ for (Component component : webApplication.getComponents()) {
151
151
}
152
152
```
153
153
154
+
Since we don't have a component model for the database, let's instead simply link the database element to the data definition language in GitHub.
If you sign in to Structurizr and open the workspace you just uploaded, you'll see something like this.
203
+
If you sign in to Structurizr and open the workspace you just uploaded, you'll see something like this.Structurizr doesn't do any automatic layout of the elements on your diagrams, so you will need to drag the boxes around to create a layout that you like. You can save the position of the diagram elements though.
198
204
199
205

200
-
201
-
Structurizr doesn't do any automatic layout of the elements on your diagrams, so you will need to drag the boxes around to create a layout that you like. You can save the position of the diagram elements though. And that's it!
0 commit comments