Is there a way to modify the default coroutine context created by Spring?

Viewed 228

Using Spring WebFlux and Kotlin Coroutines, methods in controllers are usually (if they invoke other suspending functions) marked with the suspend modifier. That means that Spring implicitly creates coroutines to call them, and it does that with some coroutine context . Is there a way to have control over that coroutine context? In particular, I'd like to add MDCContext to every coroutine context that Spring creates.

0 Answers
Related