Spring Boot 4 data layer implementation for Domain-Driven Design. Use when implementing JPA or JDBC aggregates, Spring Data repositories, transactional services, projections, or entity auditing. Covers aggregate roots with AbstractAggregateRoot, value object mapping, EntityGraph for N+1 prevention, and Spring Boot 4 specifics (JSpecify null-safety, AOT repositories). For DDD concepts and design decisions, see the domain-driven-design skill.
/plugin marketplace add joaquimscosta/arkhe-claude-plugins/plugin install spring-boot@arkhe-claude-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
EXAMPLES.mdTROUBLESHOOTING.mdreferences/aggregates.mdreferences/repositories.mdreferences/transactions.mdImplements DDD tactical patterns with Spring Data JPA and Spring Data JDBC in Spring Boot 4.
| Choose | When |
|---|---|
| Spring Data JPA | Complex queries, existing Hibernate expertise, need lazy loading |
| Spring Data JDBC | DDD-first design, simpler mapping, aggregate-per-table, no lazy loading |
Spring Data JDBC enforces aggregate boundaries naturally—recommended for new DDD projects.
AbstractAggregateRoot<T> for domain events@Embedded or @Converter for immutability@Transactional on public methods, one aggregate per transactionSee EXAMPLES.md for complete working examples including:
@NullMarked and @Nullable annotationsjakarta.* namespace| Anti-Pattern | Fix |
|---|---|
FetchType.EAGER on associations | Use LAZY + @EntityGraph when needed |
| Returning entities from controllers | Convert to DTOs in service layer |
@Transactional on private methods | Use public methods (proxy limitation) |
Missing readOnly = true on queries | Add for read operations (performance) |
| Direct aggregate-to-aggregate references | Reference by ID only |
| Multiple aggregates in one transaction | Use domain events for eventual consistency |
repository.save() before events dispatch@DataJpaTest — Use TestEntityManager for setup