-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Add Coroutines support for @EventListener
#28343
Comments
It would be really helpful, do you have any working implementation that could replace it for now? |
The original Spring Kotlin Corutines has great Kotlin Coroutines support, unfortunately it is discontinued. A lot of features are not support in current Spring framework although Spring has supported Kotlin for years. I used Kotlin Coroutines/Spring Boot in my project, and I found there are still some problems when using Coroutines in events, cache, schedule/async and Spring Security DSL config. I had to wrap the corourtines codes with a |
Spring supports Coroutines where it support reactive types, and since #21831 supports that use case, we should indeed support this use case. |
@sdeleuze I would like get the following cases working in a Spring/Kotlin Coroutines project.
|
From my point of view, Spring should not support Spring should provides Coroutines support where Reactive types are supported. For example, we recently added support for Reactive/Coroutines to For event listeners, we indeed support Reactive types on event listeners so it would make sense to support Coroutines as well (see #27515 related issue even if more focused on transactional support). So let's try to make that happen early in 6.1.x release cycle (tentatively planned for RC2 but that may be postponed depending on my bandwidth). |
Great to see schedule, cache, event listener to get Reactive/Coroutines support in Spring 6.1. |
@sdeleuze awesome work! Super thanks! |
@EventListener
and Coroutines@EventListener
Affects: Any
Spring introduced first-class support to kotlin and coroutines and while almost everything works flawlessly I really miss the support for coroutines in the
@EventListener
.I used in the past spring-kotlin-coroutine however this project is not updated for 3 years so I wonder if such support could be added to core Spring.
The text was updated successfully, but these errors were encountered: