Spring Batch 6.1: @JobParameter, cheaper restarts and four breaking changes
Spring Batch 6.1 reached general availability on 19 November, announced by project lead Mahmoud Ben Hassine. It moves to Spring Framework 7.1.0, Spring Integration 7.2.0 and Spring Data 2026.1.0. The most visible change for application code is a @JobParameter annotation that replaces @Value("#{jobParameters['inputFile']}") in step- and job-scoped beans; by default it takes the parameter name from the field or argument, which requires compiling with -parameters, the default in the Spring Boot Maven and Gradle plugins.
New readers follow the same direction away from runtime strings. PageableItemReader takes a function from a Spring Data Pageable to a Slice, checked at compile time, instead of calling a repository method by name as RepositoryItemReader does. MultiResourceItemReaderBuilder accepts location patterns directly, the MongoDB job repository gets a configurable collection prefix like the JDBC table prefix, and JsonLineMapper now maps lines to any type through Jackson or Gson.
The performance section quantifies old costs. On 6.0.4 the 12th restart of the same failed job issued 130 SQL statements, eight more per past execution; restarts now check only the last execution, a fix also shipped in 6.0.6. findJobExecutions drops from 1 + 3N queries to two. In one reported partitioning case, 837 partitions kept 700,569 StepExecution objects in memory and the polling node used 15 GB. Four changes break source or binary compatibility: the job repository DAOs moved to JdbcClient and lost their no-argument constructors, some builder return types changed, Avro reflection-based serialization now needs explicitly trusted classes, and JsonLineMapper changed its raw type.

Why it matters
The restart fix changes behaviour in production rather than in code: a job that fails and restarts often got slower with every attempt. Teams that construct the JDBC DAOs by hand are the ones who will see compile errors; those using @EnableBatchProcessing will not.