Add support to configure job instance incrementer name through environment variable / system property#5332
Closed
trisberg wants to merge 3 commits intospring-projects:mainfrom
Closed
Conversation
16ddaae to
146857d
Compare
Signed-off-by: trisberg <thomas.risberg@broadcom.com>
146857d to
86eb8c1
Compare
Signed-off-by: trisberg <thomas.risberg@broadcom.com>
Signed-off-by: trisberg <thomas.risberg@broadcom.com>
fmbenhassine
added a commit
that referenced
this pull request
Mar 18, 2026
- Use inner class for test configuration - Rename env variable and property - Refactor tests
Contributor
|
LGTM. Rebased, squashed and merged as 4580c59. Refined in 80e4349 (some minor changes). I made the exception to introduce this in a patch release. But I will plan a more comprehensive feature to configure Spring Batch through the environment for non Boot users (similar to other projects in the portfolio, for example like Spring Integration, which has this capability). Thank you for your contribution, @trisberg ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In order to be able to run both Batch 5 and 6 jobs we need a way to use the same database schema.
This PR introduces an environment variable
SPRING_BATCH_JDBC_SCHEMA_CLASSICin order to override the name for the job instance incrementer used. The classic Batch 5 schema used JOB_SEQ while the Batch 6 schema uses JOB_INSTANCE_SEQ.See issue: #5245