- Home
- Skills
- APIs & Backend
- Spring Data JPA for Spring Boot 4
Spring Data JPA for Spring Boot 4
Production-grade persistence guidance for Spring Boot 4, Jakarta Persistence 3.2, and Hibernate 7.
Free
Works with the AI tools you already use
Spring Data JPA for Spring Boot 4
Example session with this skill installed
Review this Spring Boot 4 order persistence layer. Fix its entity relationships, eliminate the N+1 queries on the order list endpoint, preserve the existing database schema, and add focused repository tests.
- Read your context and instructions
- Compiled the spring data jpa
Persistence review
The agent first inspects the entities, repository queries, migrations, transaction boundaries, serialization layer, and existing tests. It preserves the current table and column contract instead of replacing the model with generic templates.
Findings
- The order list loads customer and line data lazily outside a defined fetch plan, producing repeated queries.
- Bidirectional relationships lack clear ownership and helper methods, so both sides can drift out of sync.
- Entity equality depends on generated identifiers before persistence.
- The controller returns entities directly, making lazy loading and JSON serialization part of the API contract.
- The repository test uses mocks and cannot reveal generated SQL or mapping defects.
Deliverables
- Explicit relationship ownership, cascade choices, orphan-removal behavior, and bounded collection access.
- A repository query or entity graph tailored to the list use case without applying eager fetching globally.
- A DTO projection that preserves the endpoint response while keeping persistence entities internal.
- Pagination with deterministic ordering and no collection fetch-join count errors.
- DataJpaTest coverage for mapping constraints, optimistic locking, query counts, pagination, and the selected fetch plan.
Verification
Run the repository tests against the project's supported database profile, inspect the generated SQL for the list query, and compare query counts for one order and a multi-order page. Confirm that migrations remain unchanged unless a schema defect is explicitly identified.
Connects securely to your tools. The creator never sees your data.
About this skill
Design and review Spring Boot 4 persistence code using Jakarta Persistence 3.2, Hibernate 7, and Spring Data JPA. The skill covers entity modeling, identifier strategies, relationships, repositories, DTO projections, query behavior, N+1 prevention, pagination, batching, persistence tests, and frequent agent-generated mistakes. It includes practical entity examples and a reusable assigned-ID base entity.
Use it when building a new persistence layer, reviewing an existing data model, migrating older javax.persistence code, or diagnosing query and transaction behavior. It favors explicit mappings, bounded fetch plans, repository contracts, and tests that expose real SQL behavior.
Open source under the MIT License. GitHub is the primary source: https://github.com/rrezartprebreza/spring-boot-skills
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
1 install
Downloaded by developers to date
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean 10 days ago
- Free to download with an account