Find @Component / @Service / @Repository on data class

Proprietary

Spring stereotype classes have proxy-friendly identity (Spring wires them as singletons keyed by class). data class overrides equals/hashCode over the constructor properties — two beans with the same fields compare equal, which is rarely desirable for a service-shaped component. Promote to a regular class.

org.openrewrite.kotlin.spring.FindSpringComponentOnDataClass$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.spring.FindSpringComponentOnDataClass$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.