spring-data-jpa

Solid

Use when designing or implementing Spring Data JPA on Spring Boot 4 — repository boundaries, projections, query patterns, custom repositories, CQRS read models, entity relationships, or persistence performance fixes. Not for generic SQL help, database admin work, or project-wide migration (see the springboot-migration skill).

Data & Documents 75 stars 12 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
63
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Spring Data JPA Implementation ## Purpose Use this skill when the task is specifically about persistence design or implementation in a Spring Boot codebase. This skill adds value through aggregate-root guidance, query-pattern selection, CQRS read-model decisions, and the bundled repository and relationship templates. ## Critical rules - Never create repositories for every entity. Create repositories only for aggregate roots. - Never rely on long derived query method names when the query has become non-trivial. - Never use `save()` blindly when entity state transitions matter; understand persist versus merge behavior. - Prefer projections or dedicated query services for read-heavy paths. - Keep transaction boundaries in the service layer unless the existing architecture intentionally does otherwise. ## Workflow ### Step 1: Identify the persistence problem Collect the minimum context first: 1. Is the type an aggregate root or an internal entity? 2. Is the task primarily read-side, write-side, or both? 3. Is the query simple lookup, filtered search, aggregation, projection, or dynamic criteria? 4. Is the path performance-sensitive? 5. Are there module-boundary or loose-coupling constraints that affect relationship modeling? ### Step 2: Choose the implementation pattern Use this table to decide what to load next. | Pattern | Use when | Read | |---------|----------|------| | Simple repository | Basic CRUD and 1-2 simple lookups | Existing code or none | | `@Query` rep...

Details

Author
a-pavithraa
Repository
a-pavithraa/springboot-skills-marketplace
Created
8 months ago
Last Updated
2 weeks ago
Language
Java
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category