Building a Batch Application with Spring Batch
In this course, we will introduce the fundamental concepts of batch processing and cover the main features of Spring Batch. You will build a complete batch application with Spring Batch and Spring Boot and learn how to implement robust and fault-tolerant batch solutions.
What you'll learn
Streamline Your Daily Operations
Spring Batch is a lightweight, comprehensive batch framework designed to enable the development of robust batch applications vital for the daily operations of enterprise systems. In this course, you'll get a solid introduction to Spring Batch and learn how to use it with Spring Boot. For your course project, our experts will guide you through building and running a fully functional batch application that generates billing reports for a fictional cell phone company.
You'll learn to:
- Understand the basics of batch processing with Spring Batch
- Identify use-cases where batch processing would be helpful
- Create, run, and test batch jobs
- Structure batch jobs into workflows of steps
- Create fault-tolerant batch jobs
Before you begin
Course Prerequisites
To get the most out of this course, you should have:
- Experience with Java
- Familiarity with Spring Framework
- Working knowledge of Spring Boot
Course Outline
Spring Batch Overview
Learn a bit about batch processing, and how Spring Batch is a world-class tool for building batch processing applications.
Lab: Bootstrap the project
Create a brand new Spring Batch application using Spring Initializr.
Understanding jobs and how to run them
Learn the fundamentals of what makes up a Spring Batch application.
Lab: Implement Your First Job
Create a real Spring Batch job, run it, and learn how to inspect the results.
Understanding Job Instances
Learn about Job Instances, Job Parameters, and how they play a key role in all Spring Batch applications.
Lab: Using Job parameters to create Job Instances
Put your new-found Job Instances and Job Parameters knowledge to work in this Lab!
Lab: Testing Your Job
You'll update our application to make our tests thorough and re-runnable.
Understanding Steps
Take a step in the right direction by learning how Step
s are a fundamental building-block of Spring Batch applications.
Using Steps
You know what Step
s are, but how do you use them? You're about to learn how!
Lab: First Step
Knowledge is great, but how about action? Let's implement Step
s in our application.
Reading and Writing Data
All that data we're processing needs to go somewhere! Learn about reading and writing data.
Lab: Reading and Writing Data
Would you like to read CSV
s and write to databases? Get ready to learn!
Processing Data
Learn the main API for data processing and how to use it within a chunk-oriented step.
Lab: Processing Data
Update our Spring Batch application with chunk-based data processing.
Batch Scoped Components
Scope out @StepScope
and learn how to supply Spring Batch parameters at runtime.
Lab: Batch Scoped Components
Use @StepScope
and SpEL to make our batch job even smarter at runtime.
State management and restartability
Learn the various techniques Spring Batch uses to handle failures and rerun jobs.
Lab: Restarting failed jobs
Not everything is as fine as baguettes and brie. We'll fix a bad data-file and rerun our Spring Batch job.
Handling non-transient errors with skips
We can't just stop the world anytime we want to. Learn how and when to tell Spring Batch to skip bad data for later consideration.
Lab: Skipping invalid records
Implementing skipping invalid records is as easy as skipping through a field of daisies!
Handling transient errors with retries
Surprise! Technology can be flaky. Learn how to retry Step
s when transient errors occur.
Lab: Retrying processing errors
Implement the retry feature in this lab!