Spring PetClinic architecture.
Spring PetClinic is the Spring Boot sample application. Nodeway mapped the spring-projects/spring-petclinic repository at commit 6b2ad3e, from 28 November 2026, and found 32 source files, 118 functions, classes and components, 17 routes and 6 database tables. This page is drawn from that map.
- Source files
- 32
- Functions and classes
- 118
- Confirmed calls
- 83
- Routes
- 17
- Tables
- 6
How the code is laid out
Most of it is Java: 30 files of 32, followed by Shell (2).
The repository is split into 4 packages: folders with their own manifest, such as a package.json, pyproject.toml or go.mod. The largest are src/main/java/org/springframework/samples/petclinic/owner (12 files), src/main/java/org/springframework/samples/petclinic/vet (6 files), src/main/java/org/springframework/samples/petclinic/system (5 files) and src/main/java/org/springframework/samples/petclinic/model (4 files).
These are its top-level folders by number of source files, with 2 more files at the root. The biggest ones show their own largest folders underneath.
- src/main/java/org/springframework/samples/petclinic/30 files17 routes · 6 tables
- owner/package12 files13 routes · 4 tables
- vet/package6 files2 routes · 2 tables
- system/package5 files2 routes
- model/package4 files
Routes
Nodeway found 17 routes and linked 17 to the function that handles them. They by HTTP method: GET 12, POST 5. All are under src/main (17).
Some of them
| Route | Method |
|---|---|
| /welcome · src/main/java/org/springframework/samples/petclinic/system/WelcomeController.java | GET |
| /oupstriggerException · src/main/java/org/springframework/samples/petclinic/system/CrashController.java | GET |
| /vetsshowResourcesVetList · src/main/java/org/springframework/samples/petclinic/vet/VetController.java | GET |
| /ownersprocessFindForm · src/main/java/org/springframework/samples/petclinic/owner/OwnerController.java | GET |
| /owners/{ownerId}/pets/newinitCreationForm · src/main/java/org/springframework/samples/petclinic/owner/PetController.java | GET |
| /owners/{ownerId}/pets/{petId}/visits/newinitNewVisitForm · src/main/java/org/springframework/samples/petclinic/owner/VisitController.java | GET |
| /vets.htmlshowVetList · src/main/java/org/springframework/samples/petclinic/vet/VetController.java | GET |
| /owners/newinitCreationForm · src/main/java/org/springframework/samples/petclinic/owner/OwnerController.java | GET |
Data model
Nodeway found 6 database tables, defined with JPA. Code in the repository reads or writes 2 of them. The most used:
| Table | Used by |
|---|---|
| owners4 columns · src/main/java/org/springframework/samples/petclinic/owner/Owner.java | 6 read5 write |
| typessrc/main/java/org/springframework/samples/petclinic/owner/PetType.java | 2 read0 write |
| pets3 columns · links to types · src/main/java/org/springframework/samples/petclinic/owner/Pet.java | 0 read0 write |
| visits2 columns · src/main/java/org/springframework/samples/petclinic/owner/Visit.java | 0 read0 write |
| vets1 column · src/main/java/org/springframework/samples/petclinic/vet/Vet.java | 0 read0 write |
| specialtiessrc/main/java/org/springframework/samples/petclinic/vet/Specialty.java | 0 read0 write |
One request, traced
Nodeway followed GET /owners from its route to the code that handles it, then along confirmed calls until it reached the owners table.
- GET /ownersroute · src/main/java/org/springframework/samples/petclinic/owner/OwnerController.java
- processFindFormmethod · src/main/java/org/springframework/samples/petclinic/owner/OwnerController.java:94
- findPaginatedForOwnersLastNamemethod · src/main/java/org/springframework/samples/petclinic/owner/OwnerController.java:141
- ownerstable · read here
The most-called code
Ranked by how many different functions call each one, counting only calls the analyzer could confirm from the code. These are often the helpers worth reading first.
| Function | Callers |
|---|---|
| getIdmethod · src/main/java/org/springframework/samples/petclinic/model/BaseEntity.java | 8 |
| getNamemethod · src/main/java/org/springframework/samples/petclinic/model/NamedEntity.java | 8 |
| getPetmethod · src/main/java/org/springframework/samples/petclinic/owner/Owner.java | 6 |
| isNewmethod · src/main/java/org/springframework/samples/petclinic/model/BaseEntity.java | 5 |
| findByIdmethod · src/main/java/org/springframework/samples/petclinic/owner/OwnerRepository.java | 5 |
| getBirthDatemethod · src/main/java/org/springframework/samples/petclinic/owner/Pet.java | 4 |
| addPetmethod · src/main/java/org/springframework/samples/petclinic/owner/Owner.java | 3 |
| getSpecialtiesInternalmethod · src/main/java/org/springframework/samples/petclinic/vet/Vet.java | 3 |
Open this repo in Nodeway
Nodeway is a desktop app that draws this map on your own computer, so you can click into any folder, read the code beside the map and trace a request yourself. Clone the repository:
git clone https://github.com/spring-projects/spring-petclinic.git- Install Nodeway for macOS, Windows or Linux: the getting started guide has every installer.
- Open the cloned folder. The first map is drawn on your machine and nothing is uploaded.
- Search for
getIdand trace what it calls, or pick a route and follow it to the database.
New to reading a codebase this size? See how to understand a large codebase and how to read a call graph.
Questions
What language is Spring PetClinic written in?
Mostly Java: 30 of its 32 source files at commit 6b2ad3e, then Shell with 2.
How many routes does Spring PetClinic have?
Nodeway found 17 routes, 17 of them linked to a handler. The most are under src/main.
What database tables does Spring PetClinic use?
6 tables, defined with JPA. The most used are owners, types and pets.
How this page was made
Generated from a map Nodeway's analyzer (version 18) made of spring-projects/spring-petclinic at commit 6b2ad3e, committed on 28 November 2026. Tests, dependencies and build output are mostly left out. A call counts only when the analyzer could confirm its target from the code, so real totals are higher. The project will have changed since.