fix: EXPOSED-593 Rollback ExposedSQLException when use SpringTransactionManager#2398
Conversation
commit b1f340f Author: 육진혁 (Ivan) <10372359+FullOfOrange@users.noreply.github.com> Date: Sat Feb 8 16:41:56 2025 +0900 fix: detekt and api check commit df9f29e Merge: c7c781d a32e1f6 Author: 육진혁 (Ivan) <10372359+FullOfOrange@users.noreply.github.com> Date: Sat Feb 8 16:36:11 2025 +0900 Merge branch 'main' into fulloforange/rollback-spring commit c7c781d Author: 육진혁 (Ivan) <10372359+FullOfOrange@users.noreply.github.com> Date: Sat Feb 8 16:33:54 2025 +0900 Add ExposedSpringTransactionAttributeSource to rollback exception
bog-walk
left a comment
There was a problem hiding this comment.
Thanks for working on this PR @FullOfOrange
Just a request to edit one of the KDocs.
Please also consider rebasing from main.
| * @Primary annotation is used to avoid conflict with default TransactionAttributeSource bean | ||
| * than enable when use @EnableTransactionManagement |
There was a problem hiding this comment.
Correct me if you're actually seeing something else in the IDE, but this format (lines 78-79) will cause the lines to be ignored and not appear as part of the KDocs that show when the function is hovered over in the IDE. The KDocs attempts to resolve @Primary as a block tag, but it is not valid so it is ignored entirely.
Please quote the annotation in either backticks or single quotation marks to make it appear properly in KDocs.
There was a problem hiding this comment.
Oh, thank you for your review! I’ve applied your feedback.
e5l
left a comment
There was a problem hiding this comment.
Hey @FullOfOrange, thank you for the PR! LGTM
Description
Summary of the change:
Add
ExposedSpringTransactionAttributeSourceto fix transaction not rollback when anExposedSQLExceptionthrown when usingSpringTransactionManager.Added @bean settings to
spring-boot-starterDetailed description:
ExposedSpringTransactionAttributeSource. This is an implementation ofTransactionAttributeSource, a class for setting attributes on a transaction, and a class for addingExposedSQLExceptionas a rollback rule.UncheckedExceptionswhen using the@Transactionalannotation, butExposedSQLExceptionis aCheckedExceptionand cannot be rolled back. This makes the behavior different from the default exposed transaction, and want to fix it.ExposedSpringTransactionAttributeSourceto allow you to add an exception to the rollback rule.Type of Change
Please mark the relevant options with an "X":
Updates/remove existing public API methods:
Affected databases:
Checklist
Related Issues