Spring Batch Resources: Batch Processing, ETL And Data Conversion

Home » Blog » Software » Enterprise Software » Spring Batch Resources: Batch Processing, ETL And Data Conversion

ETL (extract, transform, load) processes, data processing, exporting data from one business system (ERP, CRM, accounting etc.) and importing it into another are common requirements in enterprise IT. So much so that the ability to export and import data often is the key feature of enterprise software.

Spring Batch is a toolkit in the context of the widely used Spring framework that allows you to define and run batch jobs and data processing pipelines. Spring Batch provides features such as:

  • data export / import job management
  • batch processing
  • reading from and writing to CSV files, XML streams and SQL databases
  • transaction management
  • chunk-based processing
  • declarative I/O
  • logic for managing / retrying / skipping jobs

As with any even moderately useful toolkit the common use cases are easy to implement while more specific and less common requirements such as reading from and writing to custom data sources tend to demand more complex solutions. This is why resources, tutorials and guides by people who’ve been through similar problems are very useful.

In this blog post I’ve compiled a list of such resources I have found useful with both implementing solutions and teaching others about how to use Spring Batch to accomplish their goals.

Quite likely the most accessible and comprehensive tutorial for beginners is the one by the comprehensive Java development website Mkyong.com (which also provides a huge amount of other valuable tutorials and resources for other Java technologies and frameworks):

Spring Batch Tutorial

Other tutorials (for both general and specific use cases) include:

Spring Batch Tutorial – The ULTIMATE Guide (PDF Download)
Spring Batch Tutorial: Introduction
Spring Batch Tutorial with Spring Boot and Java Configuration
Spring Batch Tutorial: Reading Information From a REST API
Creating a Batch Service
Using Spring Batch With Spring Boot to Consume a WebService and POST to a REST API
Spring Batch as a framework for system integration

Some Spring Batch example source code is available here:

langmi/spring-batch-tutorials
codecentric/spring-boot-starter-batch-web

If you need to read Microsoft Excel files with Spring Batch the spring-batch-excel extension might come in handy:
mdeinum/spring-batch-extensions

There’s also plenty of expedient information available on Stack Overflow that can help you with solving not-so-common problems such as how to read from a REST API or writing to a SOAP WebService with Spring Batch:

I need to write a spring batch to call the web service is there any example
Spring batch Item reader to iterate over a rest api call
how to best approach to use spring batch annotation or xml files ?

Finally, there’s an admin user interface by the Spring creators themselves that allows you to manage Spring Batch jobs:

Spring Batch Admin

Leave a Comment

By continuing to use the site you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or if you click "Accept" below then you are consenting to this.

Close