-
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
AuthorizationManager[Before/After]ReactiveMethodInterceptor doesn't support Kotlin coroutines #12080
Comments
This is blocked until spring-projects/spring-framework#22462 is addressed. See #9867 (review) for additional context. |
May I ask about the status? We made some effort to upgrade to Spring Boot 3.1.0 where reactive/suspend functions are heavily used (with |
Any updates here? The underlying issue spring-projects/spring-framework#22462 is closed since august |
No updates @martinformi @F43nd1r. I opened gh-13770 with a list of the classes that require enhancements to support this, but I just closed it as a duplicate of this issue. If anyone is interested in contributing the enhancements, it would be most welcome. |
@sjohnr took a look at the code of However, to me it looks like there are competing concepts in the code: Also, the Am I misunderstanding what the |
@F43nd1r it's tricky indeed. I am not an expert on reactive types so I had to work it out as well. The support in |
Expected Behavior
AuthorizationManager[Before/After]ReactiveMethodInterceptor
should suport Kotlin coroutinesCurrent Behavior
The now deprecated
PrePostAdviceReactiveMethodInterceptor
did support Kotlin coroutines but the newer counterparts don'tContext
At least when using a custom annotation with the new
AuthorizationManager[Before/After]ReactiveMethodInterceptor
like:I can't annotated suspended functions in Kotlin, looking at the deprecated
PrePostAdviceReactiveMethodInterceptor
coroutines functionality was added a while back, but looks like the same functionality wasn't ported to the new classes.Workaround is to use
mono {}
to wrap the suspended functions and return Mono instead to satisfyThe text was updated successfully, but these errors were encountered: