What is the purpose of the @Configuration annotation?
@Configuration declares a class as a source of Spring bean definitions through @Bean methods. See proxyBeanMethods, profiles and how it differs from @Component.
2,889 posts about Java: questions with answers, tutorials and articles, newest first.
@Configuration declares a class as a source of Spring bean definitions through @Bean methods. See proxyBeanMethods, profiles and how it differs from @Component.
Create a Spring configuration class with @Configuration and @Bean, bootstrap it, and use imports, profiles and typed properties effectively.
A POJO is a plain Java class, while a Spring bean is an object the Spring container creates, wires and manages. Learn when to use each, with examples.
Partitioning splits one step into independent slices processed in parallel. See the Partitioner, step configuration and remote scaling options.
JobRepository persists job instances, executions and step state in Spring Batch. Learn what it stores, how restarts work and how to configure it.
Build a Spring Batch job from a reader, processor and writer in a chunk-oriented step, using JobBuilder and StepBuilder instead of the removed factory classes.
Spring Batch is the Spring framework for reliable, restartable batch jobs. Learn jobs, steps, chunk processing, fault tolerance, and scaling with a Boot example.
Map extract, transform and load to ItemReader, ItemProcessor and ItemWriter in a chunk-oriented Spring Batch 5 job, with a full CSV to database example.
Start Spring Batch jobs from files, JMS or HTTP messages using Spring Integration flows and JobLaunchingGateway, with current Spring Boot 3 APIs.
Learn how Spring Batch job parameters define job instances, how to bind and validate them, and how metadata and execution contexts behave across restarts.
Register JobExecutionListener and StepExecutionListener on Spring Batch builders, and use chunk, item and skip listeners for finer monitoring.
A failed Spring Batch job resumes from its last committed chunk when relaunched with the same parameters. See the configuration, the rules and common pitfalls.
Configure a fault-tolerant Spring Batch step to retry transient errors, skip bad records within a limit, and log every skipped item with a SkipListener.
Add a TaskExecutor to a chunk step, use a thread-safe reader with saveState disabled, and choose partitioning when you need restartability.
Split a large Spring Batch step into parallel partitions using a Partitioner, a StepScope reader and a TaskExecutor, with the Spring Batch 5 builders.
Build a chunk-oriented Spring Batch step with a reader, processor and writer, tune chunk size, add skip and retry, and restart safely after failures.
Handle failures in Spring Batch 5 with retry, skip, exit status transitions, listeners and restartable job executions, using current Spring Boot 3 configuration.
Spring Batch has no scheduler. Launch jobs from @Scheduled methods with unique parameters, disable startup runs, and prevent duplicate runs on several nodes.
Use chunk steps, streaming readers, bulk writers and partitioning with skip and retry rules to run large Spring Batch jobs reliably in Spring Boot.
A working Spring Batch 5 job in Spring Boot 3: dependencies, properties, JobBuilder and StepBuilder, launching jobs and what changed from Batch 4.