From d8c70a39678a4c9a6ffad5113dfe37edea59c57c Mon Sep 17 00:00:00 2001 From: Patrick Date: Thu, 25 Aug 2022 10:47:40 -0700 Subject: [PATCH] Add Spring 2.7 configuration property changes. --- .../spring-boot-configuration-migration.yml | 122 +++++++++++++++++- 1 file changed, 118 insertions(+), 4 deletions(-) diff --git a/src/main/resources/META-INF/rewrite/spring-boot-configuration-migration.yml b/src/main/resources/META-INF/rewrite/spring-boot-configuration-migration.yml index b141a9c23..00c3775a7 100644 --- a/src/main/resources/META-INF/rewrite/spring-boot-configuration-migration.yml +++ b/src/main/resources/META-INF/rewrite/spring-boot-configuration-migration.yml @@ -1492,11 +1492,11 @@ displayName: Migrate Spring Boot properties to 2.6 description: Migrate properties found in `application.properties` and `application.yml`. recipeList: - org.openrewrite.properties.ChangePropertyKey: - oldPropertyKey: management.server.servlet.context-path - newPropertyKey: management.server.base-path + oldPropertyKey: spring.data.mongodb.grid-fs-database + newPropertyKey: spring.data.mongodb.gridfs.database - org.openrewrite.yaml.ChangePropertyKey: - oldPropertyKey: management.server.servlet.context-path - newPropertyKey: management.server.base-path + oldPropertyKey: spring.data.mongodb.grid-fs-database + newPropertyKey: spring.data.mongodb.gridfs.database - org.openrewrite.properties.ChangePropertyKey: oldPropertyKey: spring.mvc.locale newPropertyKey: spring.web.locale @@ -1647,3 +1647,117 @@ recipeList: - org.openrewrite.yaml.ChangePropertyKey: oldPropertyKey: spring.resources.static-locations newPropertyKey: spring.web.resources.static-locations + - org.openrewrite.properties.ChangePropertyKey: + oldPropertyKey: management.server.servlet.context-path + newPropertyKey: management.server.base-path + - org.openrewrite.yaml.ChangePropertyKey: + oldPropertyKey: management.server.servlet.context-path + newPropertyKey: management.server.base-path +--- +type: specs.openrewrite.org/v1beta/recipe +name: org.openrewrite.java.spring.boot2.SpringBootProperties_2_7 +displayName: Migrate Spring Boot properties to 2.7 +description: Migrate properties found in `application.properties` and `application.yml`. +recipeList: + - 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 + - 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.mode + - org.openrewrite.yaml.ChangePropertyKey: + oldPropertyKey: spring.datasource.initialization-mode + newPropertyKey: spring.sql.init.mode + - 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.flyway.check-location + newPropertyKey: spring.flyway.fail-on-missing-locations + - org.openrewrite.yaml.ChangePropertyKey: + oldPropertyKey: spring.flyway.check-location + newPropertyKey: spring.flyway.fail-on-missing-locations