Migrate to Spring Boot 3.0

MSAL

Migrate applications to the latest Spring Boot 3.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.0.

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

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. Migrate to Spring Boot 2.7
  2. Remove @EnableBatchProcessing from Spring Boot applications
  3. Change type org.hibernate.validator.internal.constraintvalidators.hv.EmailValidator to org.hibernate.validator.internal.constraintvalidators.bv.EmailValidator
  4. Migrate to Java 17
  5. Upgrade Gradle or Maven dependency versions org.springframework.boot:*:3.0.x
  6. Upgrade Gradle or Maven dependency versions org.springframework.boot:spring-boot-dependencies:3.0.x
  7. Upgrade Gradle or Maven dependency versions org.springframework:*:6.0.x
  8. Upgrade Gradle or Maven dependency versions org.springframework.ws:*:4.x
  9. Upgrade Maven plugin version org.springframework.boot:spring-boot-maven-plugin:3.0.x
  10. Upgrade Maven parent project version to org.springframework.boot:spring-boot-starter-parent:3.0.x
  11. Update a Gradle plugin by id org.springframework.boot
  12. Update a Gradle plugin by id io.spring.dependency-management
  13. Update Gradle wrapper ^7.4-bin
  14. Migrate to Spring Framework 6.0
  15. Remove Unnecessary @ConstructorBinding
  16. Use AutoConfiguration#imports
  17. Remove the deprecated properties additional-keys-to-sanitize from the configprops and env end points
  18. Rename server.max-http-header-size to server.max-http-request-header-size
  19. Downgrade Jakarta Servlet API to 5.0 when using Jetty
  20. Add @Configuration to classes with @EnableXXXSecurity annotations false
  21. Migrate Spring Boot properties to 3.0
  22. Migrate Thymeleaf dependencies to Spring Boot 3.x
  23. Migrate Dropwizard dependencies to Spring Boot 3.x
  24. Rename logback.xml to logback-spring.xml
  25. Remove SolrAutoConfiguration
  26. Migrate WebMvcTagsProvider to DefaultServerRequestObservationConvention
  27. @Bean methods may not return void
  28. Migrate to Spring Batch 5.0 from 4.3
  29. Migrate to Spring Security 6.0
  30. Migrate to Spring Cloud 2022
  31. Upgrade to SpringDoc 2.1
  32. Migrate to Hibernate 6.1.x
  33. Upgrade MyBatis to Spring Boot 3.0
  34. Migrate SAP Cloud Foundry logging support to Spring Boot 3.x