Spring Boot 3.3 best practices (only)

MSAL

Applies best practices to Spring Boot 3 applications, without chaining in upgrades to Spring Boot.

org.openrewrite.java.spring.boot3.SpringBoot3BestPracticesOnly
mod run . --recipe=org.openrewrite.java.spring.boot3.SpringBoot3BestPracticesOnly

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. Normalize Spring properties to kebab-case
  2. Enable virtual threads on Java 21
  3. Remove public from @Bean methods
  4. Bean methods should return concrete types
  5. Replace String literals with Spring constants
  6. Simplify unnecessary MediaType.parseMediaType() and MediaType.valueOf() calls
  7. Simplify WebTestClient expressions
  8. Remove unnecessary @Repository annotation from Spring Data Repository sub-interface
  9. Remove HttpExchange annotations
  10. Spring Security best practices