Replace Spring @Bean with CDI @Produces

MSAL

Transform Spring @Bean methods to CDI @Produces methods with appropriate scope annotations, keeping any other annotations on the method. Spring Security beans, beans of conditional configuration classes and beans in scopes CDI does not have are left unchanged.

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

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