-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
@PreAuthorize in combination with kotlin coroutines and @Transactional does not proceed to invoke TransactionInterceptor #10252
Comments
Thanks for reaching out @rolvraen. Do you have a minimal sample that reproduces this issue? |
@eleftherias Thanks for getting back to me. I've created a small sample that should illustrate the issue: |
@eleftherias I have rewritten the sample project from @rolvraen to three unit tests and added them to The problem seems to be that suspend functions are called with |
Since there apparently isn't in interest in fixing it, is this going to be picked up by the Spring team? |
This was addressed in the Spring Framework in #22462. Please see this comment for context specific to Spring Security. The corresponding code in Spring Security was updated in #12080 in the 6.2.0 release. Since this is a specific issue addressed by #12080, I'll mark this as closed as of |
Describe the bug
Unsure whether or not this is a bug or expected behaviour. When annotating a suspending kotlin function with both
@PreAuthorize
and@Transactional
and not returing a
Mono/Flux/Flow
thePrePostAdviceReactiveMethodInterceptor
does not proceed to invoke the transaction interceptor. It is possible to work around this issue by for example moving the@Transactional
annotation to the RestControllerTo Reproduce
Expected behavior
I would expect the PrePostAdviceReactiveMethodInterceptor to proceed to the next interceptor in the chain
The text was updated successfully, but these errors were encountered: