Skip to main content

26 docs tagged with "spring-data"

View all tags

Databases

SQL, NoSQL, connection pooling, schema migration (Flyway/Liquibase).

Domain Model

The entities, DTOs (Java Records), and enums that represent the core concepts of a loan application — and why each was designed the way it was.

Hibernate Basics for Spring Boot Developers

The Hibernate internals every Spring Boot developer must understand — SessionFactory vs Session thread safety, entity states, dirty checking, first-level cache, second-level cache, and LazyInitializationException.

JPA Basics — Entity Mapping and Relationships

How to map Java classes to database tables using @Entity, @Id, @GeneratedValue, and relationship annotations (@OneToMany, @ManyToOne), including fetch type defaults and their implications.

JPA Basics — Practical Demo

Hands-on code examples for JPA entity mapping, relationships, fetch types, and Spring Data auditing in a simple e-commerce domain.

Loan Application Evaluator

A Spring Boot REST service that evaluates loan applications using risk classification, EMI calculation, and eligibility rules — covered layer by layer.

NoSQL Trade-offs

CAP theorem, BASE properties, and when to choose Redis, MongoDB, Cassandra, or Elasticsearch over a relational database.

Persistence Layer

How LoanApplication is mapped to H2 using JPA @Embeddable value objects, @ElementCollection for rejection reasons, and @PrePersist for UUID generation.

Projects Overview

Quick-reference summary of the Loan Application Evaluator project — architecture, key patterns, tech stack decisions, and top interview talking points.

Spring Data

JPA, repositories, transactions, caching, query methods.

Spring Data Caching

How Spring's cache abstraction works with @Cacheable, @CacheEvict, @CachePut, and @Caching, plus integrating Caffeine and Redis as backing stores.

Spring Data Interview Questions

Consolidated interview Q&A for Spring Data JPA covering JPA mapping, repositories, transactions, N+1, projections, and caching — beginner through advanced.

Spring Data Overview

Quick-reference summary of Spring Data JPA — entity mapping, repository methods, transactions, N+1, projections, and caching.

Spring Data Projections

How to use interface projections, DTO projections, and dynamic projections in Spring Data JPA to select only the columns you need in a single optimized query.

Spring Data Repositories

How Spring Data JPA's repository interfaces (CrudRepository, JpaRepository) eliminate DAO boilerplate through query method derivation and @Query for JPQL and native SQL.

The N+1 Query Problem

What causes N+1 queries in JPA/Hibernate, how to diagnose them, and how to fix them with JOIN FETCH, @EntityGraph, DTO projections, and batch fetching.

Transactions — Practical Demo

Hands-on examples for @Transactional propagation, readOnly optimization, rollbackFor, the self-invocation trap, and programmatic transactions.

Transactions & ACID

Database transactions, the four ACID properties, isolation levels, and how deadlocks occur — with Spring @Transactional context.

Transactions and @Transactional

How Spring's @Transactional works under the hood with AOP proxies, propagation levels, isolation levels, readOnly optimization, rollback rules, and the self-invocation trap.