Migrate to Spring Boot 3.4
Recipe ID
io.moderne.java.spring.boot3.UpgradeSpringBoot_3_4Artifact
io.moderne.recipe:rewrite-springMigrate applications to the latest Spring Boot 3.4 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.4.
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe io.moderne.java.spring.boot3.UpgradeSpringBoot_3_4If the recipe isn’t available locally, install it with:
mod config recipes jar install io.moderne.recipe:rewrite-spring:0.39.0Definition
This recipe runs the following recipes in order.
- Migrate to Spring Boot 3.0
io.moderne.java.spring.boot3.UpgradeSpringBoot_3_0 - Migrate to Spring Boot 3.4
org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_4 - Migrate to Spring Framework 5.3
io.moderne.java.spring.framework.UpgradeSpringFramework_5_3 - Resolve Deprecations in Spring Boot 3.3
io.moderne.java.spring.boot3.ResolveDeprecationsSpringBoot_3_3 - Migrate to Reactor 3.5
org.openrewrite.reactive.reactor.UpgradeReactor_3_5 - Upgrade Spring Cloud AWS to Spring Boot 3.4 compatible version
io.moderne.java.spring.boot3.UpgradeSpringCloudAWSToSpringBoot_3_4 - Upgrade Gradle or Maven dependency versions
org.openrewrite.java.dependencies.UpgradeDependencyVersion - Migrate Spring Boot 3.4 deprecated classes and methods
io.moderne.java.spring.boot3.SpringBoot34Deprecations - Migrate
@EndpointSecurity properties to 3.4io.moderne.java.spring.boot3.SpringBootProperties_3_4 - Migrate to Spring Kafka 3.3
io.moderne.java.spring.boot3.UpgradeSpringKafka_3_3 - Change parameter type for a method declaration
org.openrewrite.java.spring.ChangeMethodParameter - Migrate to Hibernate 6.6.x
io.moderne.hibernate.MigrateToHibernate66 - Migrate to HtmlUnit 3.x
org.openrewrite.java.testing.htmlunit.UpgradeHtmlUnit_3 - Add
@Validannotation to fieldsio.moderne.java.spring.boot3.AddValidToConfigurationPropertiesFields - Migrate
ConditionalOnAvailableEndpointfor Spring Boot 3.4io.moderne.java.spring.boot3.ConditionalOnAvailableEndpointMigrationSpring34 - Remove
Replace.NONEfrom@AutoConfigureTestDatabaseio.moderne.java.spring.boot3.RemoveReplaceNoneFromAutoConfigureTestDatabase - Replace
@MockitoBeanand@MockitoSpyBeanwith@Beanmethods in@Configurationclassesio.moderne.java.spring.boot3.ReplaceMockitoBeanWithBeanMethod - Comment deprecated methods in Spring 3.4
io.moderne.java.spring.boot3.CommentDeprecations - Sync Gradle ext properties with BOM
org.openrewrite.gradle.SyncGradleExtPropertiesWithBom - Upgrade Gradle to 7.6.4+ for Spring Boot 3.4
io.moderne.java.spring.boot3.UpgradeGradle7Spring34 - Upgrade Gradle 8 to 8.4+ for Spring Boot 3.4
io.moderne.java.spring.boot3.UpgradeGradle8Spring34 - Upgrade MyBatis to Spring Boot 3.4
io.moderne.java.spring.boot3.UpgradeMyBatisToSpringBoot_3_4 - Migrate Spring Cloud properties to 2024
io.moderne.java.spring.cloud2024.SpringCloudProperties_2024
Data tables
Structured output this recipe can produce.
- Maven metadata failuresAttempts to resolve maven metadata that failed.
org.openrewrite.maven.table.MavenMetadataFailures - Source files that had resultsSource files that were modified by the recipe run.
org.openrewrite.table.SourcesFileResults - Source files that had search resultsSearch results that were found during the recipe run.
org.openrewrite.table.SearchResults - Source files that errored on a recipeThe details of all errors produced by a recipe run.
org.openrewrite.table.SourcesFileErrors - Recipe performanceStatistics used in analyzing the performance of recipes.
org.openrewrite.table.RecipeRunStats