-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Provide a configuration property for Spring Batch's validateTransactionState #44803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Yanming Zhou <[email protected]>
/** | ||
* Whether to validate the transaction state. | ||
*/ | ||
private Boolean validateTransactionState; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a boolean
with a default value of true
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should align with tablePrefix
since it's not default to BATCH_
, Spring Boot doesn't need to change if Spring Batch change its defaults, but many other AutoConfigurations doesn't work in such way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our approach has changed over time. These days, we prefer to provide a default if we can as it's better for users when looking at a property and its documentation, particularly in an IDE that supports that through the metadata. It's very unlikely that Batch will change its default. If it does, there's now a test in place that will fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we prefer to provide a default if we can as it's better for users when looking at a property and its documentation, particularly in an IDE that supports that through the metadata.
Then tablePrefix
and isolationLevelForCreate
should have default value.
See gh-44803 Signed-off-by: Yanming Zhou <[email protected]>
Thanks, @quaff. |
No description provided.