Find Spring annotation-shape smells
ProprietaryStereotype/injection annotations applied to the wrong Kotlin shape: @Component on data class, @Service on object, @Bean without @Scope, @Autowired on var / lateinit var / class-body val, and @Lazy @Autowired (a hint of circular dependencies).
org. openrewrite. kotlin. spring. FindSpringAnnotationSmells$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. spring. FindSpringAnnotationSmells$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.
Recipe list
It runs these recipes, in this order.
- Find
@Component/@Service/@Repositoryondata class - Find
@Service object Foodeclarations - Find
@Beanmethods without@Scope - Find
@Autowired varproperties (notlateinit) - Find
@Autowired lateinit varproperties (ctor-injection candidate) - Find
@Autowired valfield declarations (not in ctor) - Find
@Lazyannotations on@Autowiredproperties