Developer swaps Spring Data/Hibernate for JDBI in Petclinic persistence rewrite
In the second post of a blog series dissecting the Spring Petclinic sample app, the author replaces Spring Data and Hibernate with JDBI plus plain SQL and simple POJOs for handling persisted data. The change was motivated partly by dissatisfaction with existing tests, which the author says rely on preloaded fixture data rather than arranging data explicitly within each test.
GoKawiil's interpretation of the reporting above, not reported fact.
The author frames this as a step toward writing clearer, more self-contained tests rather than an improvement in itself, suggesting the switch to JDBI trades away some of the convenience Spring Data and JPA normally provide. This could illustrate a broader tension developers face between ORM abstraction and the transparency of hand-written SQL, especially in test-heavy codebases that need lots of data setup.
- Spring Data and Hibernate were replaced with JDBI and near-raw SQL in this Petclinic rewrite.
- The author considers the change a necessary but not clearly beneficial step toward improving test clarity.
- Existing Petclinic tests were criticized for not clearly arranging data within the test itself, hurting readability and independence.
Source: hannomalie.github.io, 2026-11-15
Published there as: “Dissecting Spring petclinic (Part 2 – Bending the persistence)”
Read the original report → The summary and analysis above are GoKawiil's own, written from reporting by the source above. Facts and quotes belong to the original publisher.