Find Spring configuration smells

Proprietary

Configuration scattered across @Value lateinit-var reads, untyped Environment.getProperty(...) calls, @ConfigurationProperties carriers that aren't data class, @Bean fun foo(): X = X() candidates for the beans { } Kotlin DSL, and misplaced @PropertySource on non-@Configuration classes.

org.openrewrite.kotlin.spring.FindSpringConfigurationSmells$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.spring.FindSpringConfigurationSmells$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.

  1. Find @Value on lateinit var properties
  2. Find Environment.getProperty(...) calls
  3. Find @ConfigurationProperties classes that aren't data class
  4. Find @Bean fun foo(): X = X() candidates for the beans { } DSL
  5. Find @PropertySource on classes that lack @Configuration