Find @Service object Foo declarations
ProprietaryA Spring @Service / @Component declared as object is a singleton at the language level — Spring will still register it as a bean, but autowiring into the object's properties is fragile (object initialization runs at class-load time, before the Spring context exists). Use a regular class so the container controls the lifecycle.
org. openrewrite. kotlin. spring. FindSpringServiceOnObject$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. spring. FindSpringServiceOnObject$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.