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.
- 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):
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:
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:
Finally, there’s an admin user interface by the Spring creators themselves that allows you to manage Spring Batch jobs: