Spring Data JDBC: When JPA's Persistence Context Is the Bug
Aggregate-oriented persistence without lazy-loading surprises, how to map one-to-many without Hibernate, and when you should stay on JPA anyway.
Category
29 articles · 104 min of reading
Aggregate-oriented persistence without lazy-loading surprises, how to map one-to-many without Hibernate, and when you should stay on JPA anyway.
How SecurityFilterChain is assembled, where UsernamePassword and JWT filters sit, and why 'it works in a test slice' still fails behind a gateway.
Cache-aside with RedisTemplate and @Cacheable: serialization, stampede locks, negative caching, and when the annotation hides a thundering herd.
spring.threads.virtual.enabled, Tomcat's protocol, synchronized pinning on old JDKs, and when a platform-thread pool still belongs in the architecture.
Advisors around ChatClient, QuestionAnswerAdvisor, and the retrieval details that matter: chunking, filters, and not stuffing the window.
Registered clients, authorization consent, token customization, and when to run SAS versus buying Okta, Keycloak, or Entra.
read-process-write with Kafka transactions, idempotent producers, and why 'exactly once' still stops at the database unless you join the TX.
Global versus GatewayFilter, ordered chains, request mutation, and the failure modes of putting business logic in the gateway.
Design one error contract for your whole API using @RestControllerAdvice, ProblemDetail, and validation groups.
A measured look at which Spring Boot startup optimizations move the needle in practice, from lazy initialization to Class Data Sharing and beyond.
A concrete pattern for idempotency keys in Spring Boot APIs, covering storage choice, request matching, and what to return on a replayed request.
How Spring Modulith turns package structure into an enforced architectural boundary, catching the coupling that code review alone tends to miss.
What actually changes when you compile Spring Boot to a GraalVM native image, and the reflection and initialization pitfalls that trip up the build.
How Micrometer and OpenTelemetry fit together in a Spring Boot service, and which metrics and traces are worth instrumenting by hand versus for free.
Comparing MapStruct's generated mappers against hand-written mapping code across boilerplate, performance, and how each handles change over time.
Why offset pagination falls apart under real data volume, and how to design keyset-based pagination and sorting APIs that stay fast at scale.
Practical rules for writing Flyway migrations that survive a real CI/CD pipeline, including rollback strategy and how to handle schema drift across environments.
Why the default executors behind @Scheduled and @Async are wrong for production, and how to configure thread pools that actually match your workload.
Using Spring's application event system to decouple side effects from core business logic, and the transactional pitfalls that come with it.
Moving past @NotBlank and @Email to validation groups, custom constraint annotations, and cross-field rules that Bean Validation can express cleanly.
How to combine Resilience4j's circuit breaker, bulkhead, and retry modules in Spring Boot without letting them fight each other.
The WebClient configuration that RestTemplate never forced you to think about, and why the defaults are wrong for most production traffic.
How Spring Boot's test slice annotations work, where they save real time, and the point at which reaching for @SpringBootTest is the better call.
A pragmatic approach to Spring profiles and externalized configuration that avoids property sprawl and keeps environment differences honest.