Training Agenda

Spring Data JPA
& Hibernate

Spring Data JPA sits on top of JPA (and typically Hibernate) to make database access in Spring applications clean, consistent, and expressive. It eliminates boilerplate DAO code through repository abstractions while still giving you full control over queries and transaction behavior when you need it. This training covers the full data access layer: entity mapping, query writing, performance pitfalls, and transaction management.

1–2 days On-site, remote, or hybrid Up to 20 participants German or English
What We Cover
From entity to query to production-safe data access
Day 1

Entity Mapping & Repositories

  • JPA entity lifecycle: @Entity, @Id, @GeneratedValue, entity states
  • Relationship mapping: @OneToMany, @ManyToOne, @ManyToMany, FetchType
  • Hibernate DDL generation vs Flyway migrations
  • Spring Data repositories: JpaRepository, query derivation, @Query
  • JPQL vs native queries: when to use which
  • Pagination and sorting: Pageable, Page, Slice
  • Projections: interface-based, DTO projections with constructor expressions
  • Auditing: @CreatedDate, @LastModifiedDate, @EnableJpaAuditing
Day 2

Performance, Transactions & Advanced Queries

  • N+1 problem: detection with Hibernate statistics and fixing with JOIN FETCH or @BatchSize
  • Lazy vs eager loading: the real trade-offs
  • Criteria API and Specifications: type-safe dynamic queries
  • Transaction management: @Transactional, propagation levels, read-only transactions
  • Second-level cache: EhCache / Redis with Hibernate
  • QueryDSL for complex predicate building
  • Connection pool tuning: HikariCP configuration for production
  • Database-specific features: native JSON support, full-text search via native queries
Learning Outcomes
What your team walks away with

Developers who understand the full JPA/Hibernate stack — not just the happy path, but the performance characteristics, transaction semantics, and query options that matter in production.

Book the Spring Data JPA training

Can be delivered as a focused 1-day performance deep-dive or a 2-day complete course covering basics through advanced query patterns.

Get in touch