Find @Autowired val field declarations (not in ctor)
ProprietaryA @Autowired private val x: X written as a class-body declaration (not a primary-constructor parameter) is functionally close to constructor injection but hides the dependency from the public constructor signature. Pull the parameter up into the primary constructor so callers and tests see the contract.
org. openrewrite. kotlin. spring. FindFieldInjectionOverConstructor$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. spring. FindFieldInjectionOverConstructor$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.