Replace Spring @Autowired with CDI @Inject

MSAL

Replace @Autowired on fields, constructors and methods with @Inject, and remove it from parameters of constructors and of injection or producer methods, which CDI injects anyway. Optional injection (required = false) and other method parameters, such as those of test methods, are left unchanged and marked for manual migration.

org.openrewrite.quarkus.spring.SpringAutowiredToInject
mod run . --recipe=org.openrewrite.quarkus.spring.SpringAutowiredToInject

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