Find WebClient.bodyToMono(X::class.java) calls

Proprietary

In suspending controllers and services, bodyToMono(X::class.java).awaitSingle() is more naturally spelled as awaitBody<X>() from kotlinx-coroutines-reactor. The reified form removes the ::class.java token and the .awaitSingle() chain.

org.openrewrite.kotlin.spring.FindWebClientWithoutAwait$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.spring.FindWebClientWithoutAwait$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.