Skip to content

Warning when EnableTransactionManagement has lower precedence than EnableMethodSecurity #17665

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yybmion
Copy link
Contributor

@yybmion yybmion commented Aug 5, 2025

Adds validation to ensure @EnableTransactionManagement has higher precedence than @EnableMethodSecurity, allowing proper transaction rollback when @PostAuthorize fails.

  • Warn when transaction management has same or lower precedence than method security
  • Add comprehensive test coverage for various precedence scenarios

Fixes #17544

…ableMethodSecurity

Warns when transaction management has same or lower precedence to prevent
issues with @PostAuthorize rollback on methods with side effects.

Fixes: spring-projects#17544

Signed-off-by: yybmion <yunyubin54@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider warning when EnableTransactionManagement has lower precedence than EnableMethodSecurity
2 participants