spring-batch
Installation
SKILL.md
Spring Batch
Spring Boot 4.x ships Spring Batch 6. The API changed significantly from 5.x (and drastically from 4.x) — most online examples are wrong. The rules that break the most agent-generated code:
- Do NOT add
@EnableBatchProcessing. Boot auto-configures theJobRepository,JobOperator, and transaction manager. Adding@EnableBatchProcessingdisables that auto-configuration and you lose all the wired beans. - Metadata is in-memory by default. Batch 6's
JobRepositoryis resourceless — nothing is persisted. Restartability and theBATCH_*audit tables require thespring-boot-starter-batch-jdbcstarter (plainspring-boot-starter-batch= no restart after a crash). JobLauncheris folded intoJobOperator(which extends it), andJobExploreris deprecated:JobRepositorynow extends it — launch throughJobOperator, query executions/instances throughJobRepository. InjectJobOperatorand callstart(job, params).JobBuilderFactory/StepBuilderFactoryare long gone, andchunk(500, txManager)is the old Batch 5 style — Batch 6 takes the size alone, with an optional.transactionManager(...).