Reference
Recipes
Java
Spring
Spring Boot 2.x
Design Partners
Migrate additional Spring Boot properties to 2.5
** org.openrewrite.java.spring.boot2.SpringBootPropertiesManual_2_5** Migrate properties found in application.properties and application.yml which are not generated automatically from Spring Boot's additional-spring-configuration-metadata.json file.

Source

  • groupId: org.openrewrite.recipe
  • artifactId: rewrite-spring
  • version: 4.25.1

Usage

This recipe has no required configuration options and can be activated directly after taking a dependency on org.openrewrite.recipe:rewrite-spring:4.25.1 in your build file:
Gradle
Maven
build.gradle
plugins {
id("org.openrewrite.rewrite") version("5.26.1")
}
rewrite {
activeRecipe("org.openrewrite.java.spring.boot2.SpringBootPropertiesManual_2_5")
}
repositories {
mavenCentral()
}
dependencies {
rewrite("org.openrewrite.recipe:rewrite-spring:4.25.1")
}
pom.xml
<project>
<build>
<plugins>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>4.31.1</version>
<configuration>
<activeRecipes>
<recipe>org.openrewrite.java.spring.boot2.SpringBootPropertiesManual_2_5</recipe>
</activeRecipes>
</configuration>
<dependencies>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-spring</artifactId>
<version>4.25.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
Recipes can also be activated directly from the command line by adding the argument -Drewrite.activeRecipesorg.openrewrite.java.spring.boot2.SpringBootPropertiesManual_2_5

Definition

Recipe List
Yaml Recipe List
    • oldPropertyKey: spring.datasource.continue-on-error
    • newPropertyKey: spring.sql.init.continue-on-error
    • oldPropertyKey: spring.datasource.continue-on-error
    • newPropertyKey: spring.sql.init.continue-on-error
    • oldPropertyKey: spring.datasource.data
    • newPropertyKey: spring.sql.init.data-locations
    • oldPropertyKey: spring.datasource.data
    • newPropertyKey: spring.sql.init.data-locations
    • oldPropertyKey: spring.datasource.data-password
    • newPropertyKey: spring.sql.init.password
    • oldPropertyKey: spring.datasource.data-password
    • newPropertyKey: spring.sql.init.password
    • oldPropertyKey: spring.datasource.data-username
    • newPropertyKey: spring.sql.init.username
    • oldPropertyKey: spring.datasource.data-username
    • newPropertyKey: spring.sql.init.username
    • oldPropertyKey: spring.datasource.initialization-mode
    • newPropertyKey: spring.sql.init.enabled
    • oldPropertyKey: spring.datasource.initialization-mode
    • newPropertyKey: spring.sql.init.enabled
    • oldPropertyKey: spring.datasource.platform
    • newPropertyKey: spring.sql.init.platform
    • oldPropertyKey: spring.datasource.platform
    • newPropertyKey: spring.sql.init.platform
    • oldPropertyKey: spring.datasource.schema
    • newPropertyKey: spring.sql.init.schema-locations
    • oldPropertyKey: spring.datasource.schema
    • newPropertyKey: spring.sql.init.schema-locations
    • oldPropertyKey: spring.datasource.schema-password
    • newPropertyKey: spring.sql.init.password
    • oldPropertyKey: spring.datasource.schema-password
    • newPropertyKey: spring.sql.init.password
    • oldPropertyKey: spring.datasource.schema-username
    • newPropertyKey: spring.sql.init.username
    • oldPropertyKey: spring.datasource.schema-username
    • newPropertyKey: spring.sql.init.username
    • oldPropertyKey: spring.datasource.separator
    • newPropertyKey: spring.sql.init.separator
    • oldPropertyKey: spring.datasource.separator
    • newPropertyKey: spring.sql.init.separator
    • oldPropertyKey: spring.datasource.sql-script-encoding
    • newPropertyKey: spring.sql.init.encoding
    • oldPropertyKey: spring.datasource.sql-script-encoding
    • newPropertyKey: spring.sql.init.encoding
    • oldPropertyKey: spring.artemis.host
    • newPropertyKey: spring.artemis.broker-url
    • oldPropertyKey: spring.artemis.host
    • newPropertyKey: spring.artemis.broker-url
    • oldPropertyKey: spring.artemis.port
    • newPropertyKey: spring.artemis.broker-url
    • oldPropertyKey: spring.artemis.port
    • newPropertyKey: spring.artemis.broker-url
    • oldPropertyKey: spring.batch.initialize-schema
    • newPropertyKey: spring.batch.jdbc.initialize-schema
    • oldPropertyKey: spring.batch.initialize-schema
    • newPropertyKey: spring.batch.jdbc.initialize-schema
    • oldPropertyKey: spring.batch.schema
    • newPropertyKey: spring.batch.jdbc.schema
    • oldPropertyKey: spring.batch.schema
    • newPropertyKey: spring.batch.jdbc.schema
    • oldPropertyKey: spring.batch.table-prefix
    • newPropertyKey: spring.batch.jdbc.table-prefix
    • oldPropertyKey: spring.batch.table-prefix
    • newPropertyKey: spring.batch.jdbc.table-prefix
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.spring.boot2.SpringBootPropertiesManual_2_5
displayName: Migrate additional Spring Boot properties to 2.5
description: Migrate properties found in `application.properties` and `application.yml` which are not generated automatically from Spring Boot's `additional-spring-configuration-metadata.json` file.
recipeList:
- org.openrewrite.properties.ChangePropertyKey:
oldPropertyKey: spring.datasource.continue-on-error
newPropertyKey: spring.sql.init.continue-on-error
- org.openrewrite.yaml.ChangePropertyKey:
oldPropertyKey: spring.datasource.continue-on-error
newPropertyKey: spring.sql.init.continue-on-error
- org.openrewrite.properties.ChangePropertyKey:
oldPropertyKey: spring.datasource.data
newPropertyKey: spring.sql.init.data-locations
- org.openrewrite.yaml.ChangePropertyKey:
oldPropertyKey: spring.datasource.data
newPropertyKey: spring.sql.init.data-locations
- org.openrewrite.properties.ChangePropertyKey:
oldPropertyKey: spring.datasource.data-password
newPropertyKey: spring.sql.init.password
- org.openrewrite.yaml.ChangePropertyKey:
oldPropertyKey: spring.datasource.data-password
newPropertyKey: spring.sql.init.password
- org.openrewrite.properties.ChangePropertyKey:
oldPropertyKey: spring.datasource.data-username
newPropertyKey: spring.sql.init.username
- org.openrewrite.yaml.ChangePropertyKey:
oldPropertyKey: spring.datasource.data-username
newPropertyKey: spring.sql.init.username
- org.openrewrite.properties.ChangePropertyKey:
oldPropertyKey: spring.datasource.initialization-mode
newPropertyKey: spring.sql.init.enabled
- org.openrewrite.yaml.ChangePropertyKey:
oldPropertyKey: spring.datasource.initialization-mode
newPropertyKey: spring.sql.init.enabled
- org.openrewrite.properties.ChangePropertyKey:
oldPropertyKey: spring.datasource.platform
newPropertyKey: spring.sql.init.platform
- org.openrewrite.yaml.ChangePropertyKey:
oldPropertyKey: spring.datasource.platform
newPropertyKey: spring.sql.init.platform
- org.openrewrite.properties.ChangePropertyKey:
oldPropertyKey: spring.datasource.schema
newPropertyKey: spring.sql.init.schema-locations
- org.openrewrite.yaml.ChangePropertyKey:
oldPropertyKey: spring.datasource.schema
newPropertyKey: spring.sql.init.schema-locations
- org.openrewrite.properties.ChangePropertyKey:
oldPropertyKey: spring.datasource.schema-password
newPropertyKey: spring.sql.init.password
- org.openrewrite.yaml.ChangePropertyKey:
oldPropertyKey: spring.datasource.schema-password
newPropertyKey: spring.sql.init.password
- org.openrewrite.properties.ChangePropertyKey:
oldPropertyKey: spring.datasource.schema-username
newPropertyKey: spring.sql.init.username
- org.openrewrite.yaml.ChangePropertyKey:
oldPropertyKey: spring.datasource.schema-username
newPropertyKey: spring.sql.init.username
- org.openrewrite.properties.ChangePropertyKey:
oldPropertyKey: spring.datasource.separator
newPropertyKey: spring.sql.init.separator
- org.openrewrite.yaml.ChangePropertyKey:
oldPropertyKey: spring.datasource.separator
newPropertyKey: spring.sql.init.separator
- org.openrewrite.properties.ChangePropertyKey:
oldPropertyKey: spring.datasource.sql-script-encoding
newPropertyKey: spring.sql.init.encoding
- org.openrewrite.yaml.ChangePropertyKey:
oldPropertyKey: spring.datasource.sql-script-encoding
newPropertyKey: spring.sql.init.encoding
- org.openrewrite.properties.ChangePropertyKey:
oldPropertyKey: spring.artemis.host
newPropertyKey: spring.artemis.broker-url
- org.openrewrite.yaml.ChangePropertyKey:
oldPropertyKey: spring.artemis.host
newPropertyKey: spring.artemis.broker-url
- org.openrewrite.properties.ChangePropertyKey:
oldPropertyKey: spring.artemis.port
newPropertyKey: spring.artemis.broker-url
- org.openrewrite.yaml.ChangePropertyKey:
oldPropertyKey: spring.artemis.port
newPropertyKey: spring.artemis.broker-url
- org.openrewrite.properties.ChangePropertyKey:
oldPropertyKey: spring.batch.initialize-schema
newPropertyKey: spring.batch.jdbc.initialize-schema
- org.openrewrite.yaml.ChangePropertyKey:
oldPropertyKey: spring.batch.initialize-schema
newPropertyKey: spring.batch.jdbc.initialize-schema
- org.openrewrite.properties.ChangePropertyKey:
oldPropertyKey: spring.batch.schema
newPropertyKey: spring.batch.jdbc.schema
- org.openrewrite.yaml.ChangePropertyKey:
oldPropertyKey: spring.batch.schema
newPropertyKey: spring.batch.jdbc.schema
- org.openrewrite.properties.ChangePropertyKey:
oldPropertyKey: spring.batch.table-prefix
newPropertyKey: spring.batch.jdbc.table-prefix
- org.openrewrite.yaml.ChangePropertyKey:
oldPropertyKey: spring.batch.table-prefix
newPropertyKey: spring.batch.jdbc.table-prefix
Export as PDF
Copy link