spring-batch

Solid

Use when building batch jobs, ETL pipelines, scheduled imports/exports, or any chunk-oriented bulk processing with Spring Batch. Covers the Spring Batch 6 / Boot 4 builder API, resourceless vs JDBC job repositories, restartability and idempotent job parameters, reader/writer thread-safety, fault tolerance, and chunk transaction boundaries.

AI & Automation 225 stars 37 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
78
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 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: 1. **Do NOT add `@EnableBatchProcessing`.** Boot auto-configures the `JobRepository`, `JobOperator`, and transaction manager. Adding `@EnableBatchProcessing` **disables** that auto-configuration and you lose all the wired beans. 2. **Metadata is in-memory by default.** Batch 6's `JobRepository` is *resourceless* — nothing is persisted. Restartability and the `BATCH_*` audit tables require the `spring-boot-starter-batch-jdbc` starter (plain `spring-boot-starter-batch` = no restart after a crash). 3. **`JobLauncher` and `JobExplorer` are consolidated into `JobOperator`** (which extends both). Inject `JobOperator` and call `start(job, params)`. 4. **`JobBuilderFactory`/`StepBuilderFactory` are long gone**, and `chunk(500, txManager)` is the old Batch 5 style — Batch 6 takes the size alone, with an optional `.transactionManager(...)`. ## Dependencies ```xml <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-batch-jdbc</artifactId> <!-- persistent BATCH_* metadata --> </dependency> <!-- spring-boot-starter-batch alone = resourceless in-memory repository: fine for run-and-forget jobs, but no restart-on-failure, no audit trail --> ``` ## Job & Step (Spring Batch 6 API) ```java @Configuration @Required...

Details

Author
rrezartprebreza
Repository
rrezartprebreza/spring-boot-skills
Created
4 months ago
Last Updated
6 days ago
Language
Java
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category