-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Spring Batch 5.0 Migration Guide
This document is meant to help you migrate your application to Spring Batch 5.0.
This document is a work in progress.
Spring Batch 5 is based on Spring Framework 6 which requires Java 17 as a minimum version.
TBD
Up until v4, the DDL script for MS SQLServer used tables to emulates sequences. In this version, this usage has been updated with real sequences:
CREATE SEQUENCE BATCH_STEP_EXECUTION_SEQ START WITH 0 MINVALUE 0 MAXVALUE 9223372036854775807 NO CACHE NO CYCLE;
CREATE SEQUENCE BATCH_JOB_EXECUTION_SEQ START WITH 0 MINVALUE 0 MAXVALUE 9223372036854775807 NO CACHE NO CYCLE;
CREATE SEQUENCE BATCH_JOB_SEQ START WITH 0 MINVALUE 0 MAXVALUE 9223372036854775807 NO CACHE NO CYCLE;
New applications can use the provided script with no modification. Existing applications should consider to modify the snippet above to start sequences from the last value in sequences tables that were used with v4.
In this version, Oracle sequences are now ordered. The sequences creation script has been updated for new applications. Existing applications can use the migration script in org/springframework/batch/core/migration/5.0/migration-oracle.sql
to alter the existing sequences.
The Map-based job repository/explorer implementation were deprecated in v4 and completely removed in v5. You should use the Jdbc-based implementation instead. Unless you are using a custom Job repository/explorer implementation, the @EnableBatchProcessing
annotation will configure a Jdbc-based JobRepository
which requires a DataSource
bean in the application context.
// TODO Add code example of migration
TBD
TBD