Skip to main content

Spring Batch on Boot 4.1: Jobs, Steps, Chunk Processing and Restartability

Spring Boot 4.1 ships Spring Batch 6.0. This article builds a real chunk-oriented import job against a CSV of products, deliberately breaks it on a duplicate row mid-run, and shows exactly what a restart resumes (and what it doesn't) against real captured output: a chunk that commits as a whole or not at all, a second JVM that resumes at row 41 instead of row 1, skip-instead-of-fail as the alternative to restarting, and the resourceless job repository that silently forgets a restart ever happened.

The Spring Cache Abstraction: @Cacheable, @CacheEvict, Key Generators and the Self-Invocation Trap

A beginner-first walk through Spring's application-level caching on Spring Boot 4.1.1: what the interceptor actually does, what SimpleKeyGenerator puts in the map, and the four traps that account for most caching bugs — self-invocation, key collisions, eviction timing, and declarations that only fail at the first call. Every figure comes out of a companion project whose 20 tests produce the transcripts. Includes two corrections: @EnableCaching has no exposeProxy attribute, and the documented cache-provider detection order does not match the enum that ships.

Global Exception Handling with ProblemDetail (RFC 9457) in Spring Boot 4

Where a Spring Boot 4 error body actually comes from, what spring.mvc.problemdetails.enabled does and does not cover, and a thirteen-failure matrix under five setups, plus the ways a tidy ProblemDetail setup hides 500s, leaks internals, or changed underneath you in Spring Framework 7.

@Transactional in Spring: Propagation, Isolation, and the Six Ways It Silently Does Nothing

All seven propagation values with runnable proof and transaction-manager logs, the rollback rules, and why catching an inner failure still ends in UnexpectedRollbackException. Plus six ways @Transactional is present, correct, and inert — two of which commit work the code was trying to abandon — and why Propagation.NESTED cannot be used with JpaTransactionManager at all. Spring Boot 4.1.1, JDK 25.

Spring AOP Explained: Pointcuts, Advice Types, and Why Your Aspect Isn’t Firing

An aspect that does not fire produces no error and no log line. A full reference for the ten pointcut designators Spring AOP supports (generated from real matches) and the fourteen it rejects, the difference between JDK and CGLIB proxies measured side by side, and a gallery of six aspects that silently do nothing. Includes two corrections to the reference documentation. Spring Boot 4.1.1, AspectJ 1.9.25.1, JDK 25.

Spring Boot Profiles Done Right: Config Import, Config Trees and Kubernetes ConfigMaps

You set a value in application-prod.yaml, deployed with prod active, and the old value is still in effect. The reason is a single line of the documented precedence list: config data is item 3 and environment variables are item 5. A measured walk through the precedence stack, profile groups and multi-document files, config trees and Kubernetes ConfigMaps, and the spring.config.import ordering that overrides you rather than the other way round.