Concept
A versioning stance is an operating decision, not a routing decoration. This course chooses /api/v1 because it is explicit, easy to test, and clear to consumers.
Task
- Move every public endpoint under /api/v1.
- Write ADR-001 with the layer boundaries and versioning stance.
- Add a test that fails if the cinema endpoint is exposed without /api/v1.
Run
./gradlew test --tests "*CinemaApiVersioningTest"Expected Result
- GET /api/v1/cinemas succeeds.
- GET /cinemas does not become an accidental public contract.
Common Traps
- Writing an ADR that says what happened but not why.
- Treating Spring Framework 7 native API versioning as a reason to complicate this repo now.
- Versioning only some endpoints.
Hint Ladder
Hint 1
The ADR should be short enough to read during review.
Hint 2
Mention the Framework 7 API versioning feature as an aside, not an implementation dependency.
Hint 3
The route prefix is part of the public contract. Test it like one.
Solution
Reference solution will link to ADR-001 once the learner repo is public.
Boot 3 to 4 Delta
Spring Framework 7 has native API versioning support. This course records it as currency knowledge while keeping the implementation URI-based.