Spring batch is an open-source framework used to develop batch applications that are important for enterprise systems to perform daily operations. These operations include automatic and efficient processing of larger information, processing of repetitive tasks over larger data sets, and information integration received by different resources on a daily basis.
The spring batch has a layered architecture to ease the users as well as developers. The layered architecture of the spring batch with three high-level components is illustrated below:
Application: All custom codes written using spring batch and all batch jobs are contained by the application layer.
Batch Core: The core functionality to launch a batch job is defined in batch core. The implementation of job-launcher, job, and test are included in it in the form of API classes.
Batch Infrastructure: The services that are used by application developers, as well as batch core, are defined in infrastructure core. The common services are itemReader
, itemWriter
, retryTemplates
, etc.
The following illustration shows the connectivity of different components of batch spring with each other.
JobLauncher: Triggers the job by reading job parameters and other information required to execute the job from the job repository. It provides an interface to launch the spring batch job.
Job: The batch process that is to be executed without any interruption is a job.
Step: A job is executed in single or multiple steps. The common steps to execute a job are defined in the batch core component illustration.
Job Repository: The CRUD operations for all three component's implementation, which means that jobLauncher, job, and step to maintain states, are provided by the job repository.
RELATED TAGS
CONTRIBUTOR
View all Courses