Spring Batch 5 to 6 Migration Guide
Spring Batch 6 moves classes to new packages, changes what the Spring Boot starter gives you, and adds a second way to write a chunk step. Most of it fails loudly. One change does not: a listener that stops being called. This article migrates one small job from Batch 5 to Batch 6, one step at a time, and shows what each step prints. You should know what a batch job and step are. Everything else is explained on the way. If you are new to Batch itself, start with Spring Batch on Boot 4.1: jobs, steps, chunk processing and restartability. Versions tested. Before: Spring Boot 3.5.16 with Spring Batch 5.2.6 on JDK 21. After: Spring Boot 4.1.1 with Spring Batch 6.0.5, the latest GA, on JDK 25.0.4.1. Batch 6.1.0-M1 and 6.1.0-M2 exist as milestones and were not tested. Date: 28 September 2026. Companion code: spring-boot-demo/batch-5-to-6.