How ddubson/spring-batch-examples works
Project type and purpose
• This is a Kotlin-based Spring Batch “examples” project, packaged as a Spring Boot application.
• Its purpose is to demonstrate a variety of batch‐processing use cases (reading, writing, chunking, partitioning, error handling, remote delegates, job control, etc.).
File structure
• Top‐level artifacts:
– build.gradle, settings.gradle, Gradle wrapper → build system for a Spring Boot JAR.
– README.md → describes 36 example jobs, each checked out via git tags.
• src/main/kotlin/com/ddubson/batch:
– Application.kt → Spring Boot entry point that boots up Spring Batch.
– JobConfiguration.kt → central @Configuration class defining one or more Job beans (JobBuilderFactory, StepBuilderFactory).
• src/main/resources/application.yml → externalizes environment profiles, data sources, queue addresses, job parameters.
README for architecture clues
• Each sample tag wires a different JobConfiguration variant: basic steps, conditional flows, chunk‐processing readers/writers (DB ∙ FS ∙ XML), processors (filter, validate, chain), listeners, restart/retry/skip, multi‐threading, partitioning (local/remote with RabbitMQ), remote chunking, HTTP control endpoints, scheduler, Spring Integration messaging.
• It implies an architecture where the same Spring Boot app can be launched with different profiles (master/slave), exposing HTTP endpoints, connecting to external systems (database, file system, RabbitMQ).
Detail
• Every layer: bootstrap → configuration → job graph → step internals → commit framework → external connectors.
• Do not over‐abstract: show both the JobRepository database and the business‐data database if separate.
• Error and listener hooks where relevant (pre/chunk listeners).
• Profiles (master vs. slave) on the respective components.