Migrate Spring Boot properties to 2.0
org.openrewrite.java.spring.boot2.SpringBootProperties_2_0
Migrate properties found in application.properties
and application.yml
.
Tags
spring
boot
Recipe source
GitHub, Issue Tracker, Maven Central
groupId: org.openrewrite.recipe
artifactId: rewrite-spring
version: 5.8.0
This recipe is composed of more than one recipe. If you want to customize the set of recipes this is composed of, you can find and copy the GitHub source for the recipe from the link above.
Usage
This recipe has no required configuration options. It can be activated by adding a dependency on org.openrewrite.recipe:rewrite-spring:5.8.0
in your build file or by running a shell command (in which case no build changes are needed):
Add the following to your
build.gradle
file:
Run
gradle rewriteRun
to run the recipe.
Definition
Change the key of a spring application property
oldPropertyKey:
spring.main.show-banner
newPropertyKey:
spring.main.banner-mode
Change the key of a spring application property
oldPropertyKey:
spring.main.web-environment
newPropertyKey:
spring.main.web-application-type
Change the key of a spring application property
oldPropertyKey:
banner.charset
newPropertyKey:
spring.banner.charset
Change the key of a spring application property
oldPropertyKey:
banner.image.height
newPropertyKey:
spring.banner.image.height
Change the key of a spring application property
oldPropertyKey:
banner.image.invert
newPropertyKey:
spring.banner.image.invert
Change the key of a spring application property
oldPropertyKey:
banner.image.location
newPropertyKey:
spring.banner.image.location
Change the key of a spring application property
oldPropertyKey:
banner.image.margin
newPropertyKey:
spring.banner.image.margin
Change the key of a spring application property
oldPropertyKey:
banner.image.width
newPropertyKey:
spring.banner.image.width
Change the key of a spring application property
oldPropertyKey:
banner.location
newPropertyKey:
spring.banner.location
Change the key of a spring application property
oldPropertyKey:
security.filter-dispatcher-types
newPropertyKey:
spring.security.filter.dispatcher-types
Change the key of a spring application property
oldPropertyKey:
security.filter-order
newPropertyKey:
spring.security.filter.order
Change the key of a spring application property
oldPropertyKey:
spring.data.cassandra.repositories.enabled
newPropertyKey:
spring.data.cassandra.repositories.type
Change the key of a spring application property
oldPropertyKey:
spring.data.couchbase.repositories.enabled
newPropertyKey:
spring.data.couchbase.repositories.type
Change the key of a spring application property
oldPropertyKey:
spring.data.mongodb.repositories.enabled
newPropertyKey:
spring.data.mongodb.repositories.type
Change the key of a spring application property
oldPropertyKey:
spring.jta.bitronix.properties.background-recovery-interval
newPropertyKey:
spring.jta.bitronix.properties.background-recovery-interval-seconds
Change the key of a spring application property
oldPropertyKey:
spring.mvc.media-types
newPropertyKey:
spring.mvc.contentnegotiation.media-types
Change the key of a spring application property
oldPropertyKey:
flyway.baseline-description
newPropertyKey:
spring.flyway.baseline-description
Change the key of a spring application property
oldPropertyKey:
flyway.baseline-on-migrate
newPropertyKey:
spring.flyway.baseline-on-migrate
Change the key of a spring application property
oldPropertyKey:
flyway.baseline-version
newPropertyKey:
spring.flyway.baseline-version
Change the key of a spring application property
oldPropertyKey:
flyway.check-location
newPropertyKey:
spring.flyway.check-location
Change the key of a spring application property
oldPropertyKey:
flyway.clean-on-validation-error
newPropertyKey:
spring.flyway.clean-on-validation-error
Change the key of a spring application property
oldPropertyKey:
flyway.enabled
newPropertyKey:
spring.flyway.enabled
Change the key of a spring application property
oldPropertyKey:
flyway.encoding
newPropertyKey:
spring.flyway.encoding
Change the key of a spring application property
oldPropertyKey:
flyway.init-sqls
newPropertyKey:
spring.flyway.init-sqls
Change the key of a spring application property
oldPropertyKey:
flyway.locations
newPropertyKey:
spring.flyway.locations
Change the key of a spring application property
oldPropertyKey:
flyway.out-of-order
newPropertyKey:
spring.flyway.out-of-order
Change the key of a spring application property
oldPropertyKey:
flyway.password
newPropertyKey:
spring.flyway.password
Change the key of a spring application property
oldPropertyKey:
flyway.placeholder-prefix
newPropertyKey:
spring.flyway.placeholder-prefix
Change the key of a spring application property
oldPropertyKey:
flyway.placeholder-replacement
newPropertyKey:
spring.flyway.placeholder-replacement
Change the key of a spring application property
oldPropertyKey:
flyway.placeholder-suffix
newPropertyKey:
spring.flyway.placeholder-suffix
Change the key of a spring application property
oldPropertyKey:
flyway.placeholders
newPropertyKey:
spring.flyway.placeholders
Change the key of a spring application property
oldPropertyKey:
flyway.schemas
newPropertyKey:
spring.flyway.schemas
Change the key of a spring application property
oldPropertyKey:
flyway.sql-migration-prefix
newPropertyKey:
spring.flyway.sql-migration-prefix
Change the key of a spring application property
oldPropertyKey:
flyway.sql-migration-separator
newPropertyKey:
spring.flyway.sql-migration-separator
Change the key of a spring application property
oldPropertyKey:
flyway.sql-migration-suffix
newPropertyKey:
spring.flyway.sql-migration-suffixes
Change the key of a spring application property
oldPropertyKey:
flyway.table
newPropertyKey:
spring.flyway.table
Change the key of a spring application property
oldPropertyKey:
flyway.target
newPropertyKey:
spring.flyway.target
Change the key of a spring application property
oldPropertyKey:
flyway.url
newPropertyKey:
spring.flyway.url
Change the key of a spring application property
oldPropertyKey:
flyway.user
newPropertyKey:
spring.flyway.user
Change the key of a spring application property
oldPropertyKey:
flyway.validate-on-migrate
newPropertyKey:
spring.flyway.validate-on-migrate
Change the key of a spring application property
oldPropertyKey:
liquibase.change-log
newPropertyKey:
spring.liquibase.change-log
Change the key of a spring application property
oldPropertyKey:
liquibase.check-change-log-location
newPropertyKey:
spring.liquibase.check-change-log-location
Change the key of a spring application property
oldPropertyKey:
liquibase.contexts
newPropertyKey:
spring.liquibase.contexts
Change the key of a spring application property
oldPropertyKey:
liquibase.default-schema
newPropertyKey:
spring.liquibase.default-schema
Change the key of a spring application property
oldPropertyKey:
liquibase.drop-first
newPropertyKey:
spring.liquibase.drop-first
Change the key of a spring application property
oldPropertyKey:
liquibase.enabled
newPropertyKey:
spring.liquibase.enabled
Change the key of a spring application property
oldPropertyKey:
liquibase.labels
newPropertyKey:
spring.liquibase.labels
Change the key of a spring application property
oldPropertyKey:
liquibase.parameters
newPropertyKey:
spring.liquibase.parameters
Change the key of a spring application property
oldPropertyKey:
liquibase.password
newPropertyKey:
spring.liquibase.password
Change the key of a spring application property
oldPropertyKey:
liquibase.rollback-file
newPropertyKey:
spring.liquibase.rollback-file
Change the key of a spring application property
oldPropertyKey:
liquibase.url
newPropertyKey:
spring.liquibase.url
Change the key of a spring application property
oldPropertyKey:
liquibase.user
newPropertyKey:
spring.liquibase.user
Change the key of a spring application property
oldPropertyKey:
security.user.name
newPropertyKey:
spring.security.user.name
Change the key of a spring application property
oldPropertyKey:
security.user.password
newPropertyKey:
spring.security.user.password
Change the key of a spring application property
oldPropertyKey:
security.user.role
newPropertyKey:
spring.security.user.roles
Change the key of a spring application property
oldPropertyKey:
server.context-parameters
newPropertyKey:
server.servlet.context-parameters
Change the key of a spring application property
oldPropertyKey:
server.context-path
newPropertyKey:
server.servlet.context-path
Change the key of a spring application property
oldPropertyKey:
server.display-name
newPropertyKey:
server.servlet.application-display-name
Change the key of a spring application property
oldPropertyKey:
server.jsp-servlet.class-name
newPropertyKey:
server.servlet.jsp.class-name
Change the key of a spring application property
oldPropertyKey:
server.jsp-servlet.init-parameters
newPropertyKey:
server.servlet.jsp.init-parameters
Change the key of a spring application property
oldPropertyKey:
server.jsp-servlet.registered
newPropertyKey:
server.servlet.jsp.registered
Change the key of a spring application property
oldPropertyKey:
server.servlet-path
newPropertyKey:
server.servlet.path
Change the key of a spring application property
oldPropertyKey:
server.session.cookie.comment
newPropertyKey:
server.servlet.session.cookie.comment
Change the key of a spring application property
oldPropertyKey:
server.session.cookie.domain
newPropertyKey:
server.servlet.session.cookie.domain
Change the key of a spring application property
oldPropertyKey:
server.session.cookie.http-only
newPropertyKey:
server.servlet.session.cookie.http-only
Change the key of a spring application property
oldPropertyKey:
server.session.cookie.max-age
newPropertyKey:
server.servlet.session.cookie.max-age
Change the key of a spring application property
oldPropertyKey:
server.session.cookie.name
newPropertyKey:
server.servlet.session.cookie.name
Change the key of a spring application property
oldPropertyKey:
server.session.cookie.path
newPropertyKey:
server.servlet.session.cookie.path
Change the key of a spring application property
oldPropertyKey:
server.session.cookie.secure
newPropertyKey:
server.servlet.session.cookie.secure
Change the key of a spring application property
oldPropertyKey:
server.session.persistent
newPropertyKey:
server.servlet.session.persistent
Change the key of a spring application property
oldPropertyKey:
server.session.store-dir
newPropertyKey:
server.servlet.session.store-dir
Change the key of a spring application property
oldPropertyKey:
server.session.timeout
newPropertyKey:
server.servlet.session.timeout
Change the key of a spring application property
oldPropertyKey:
server.session.tracking-modes
newPropertyKey:
server.servlet.session.tracking-modes
Change the key of a spring application property
oldPropertyKey:
spring.batch.initializer.enabled
newPropertyKey:
spring.batch.initialize-schema
Change the key of a spring application property
oldPropertyKey:
spring.data.cassandra.connect-timeout-millis
newPropertyKey:
spring.data.cassandra.connect-timeout
Change the key of a spring application property
oldPropertyKey:
spring.data.cassandra.read-timeout-millis
newPropertyKey:
spring.data.cassandra.read-timeout
Change the key of a spring application property
oldPropertyKey:
spring.datasource.initialize
newPropertyKey:
spring.datasource.initialization-mode
Change the key of a spring application property
oldPropertyKey:
spring.flyway.sql-migration-suffix
newPropertyKey:
spring.flyway.sql-migration-suffixes
Change the key of a spring application property
oldPropertyKey:
spring.git.properties
newPropertyKey:
spring.info.git.location
Change the key of a spring application property
oldPropertyKey:
spring.http.multipart.enabled
newPropertyKey:
spring.servlet.multipart.enabled
Change the key of a spring application property
oldPropertyKey:
spring.http.multipart.file-size-threshold
newPropertyKey:
spring.servlet.multipart.file-size-threshold
Change the key of a spring application property
oldPropertyKey:
spring.http.multipart.location
newPropertyKey:
spring.servlet.multipart.location
Change the key of a spring application property
oldPropertyKey:
spring.http.multipart.max-file-size
newPropertyKey:
spring.servlet.multipart.max-file-size
Change the key of a spring application property
oldPropertyKey:
spring.http.multipart.max-request-size
newPropertyKey:
spring.servlet.multipart.max-request-size
Change the key of a spring application property
oldPropertyKey:
spring.http.multipart.resolve-lazily
newPropertyKey:
spring.servlet.multipart.resolve-lazily
Change the key of a spring application property
oldPropertyKey:
spring.messages.cache-seconds
newPropertyKey:
spring.messages.cache-duration
Change the key of a spring application property
oldPropertyKey:
spring.redis.pool.max-active
newPropertyKey:
spring.redis.jedis.pool.max-idle
Change the key of a spring application property
oldPropertyKey:
spring.redis.pool.max-idle
newPropertyKey:
spring.redis.jedis.pool.max-idle
Change the key of a spring application property
oldPropertyKey:
spring.redis.pool.max-wait
newPropertyKey:
spring.redis.jedis.pool.max-wait
Change the key of a spring application property
oldPropertyKey:
spring.redis.pool.min-idle
newPropertyKey:
spring.redis.jedis.pool.min-idle
Change the key of a spring application property
oldPropertyKey:
spring.resources.cache-period
newPropertyKey:
spring.resources.cache.period
Change the key of a spring application property
oldPropertyKey:
spring.session.jdbc.initializer.enabled
newPropertyKey:
spring.session.jdbc.initialize-schema
Change the key of a spring application property
oldPropertyKey:
spring.session.mongo.collection-name
newPropertyKey:
spring.session.mongodb.collection-name
Change the key of a spring application property
oldPropertyKey:
spring.thymeleaf.content-type
newPropertyKey:
spring.thymeleaf.servlet.content-type
Change the key of a spring application property
oldPropertyKey:
spring.couchbase.env.endpoints.query
newPropertyKey:
spring.couchbase.env.endpoints.queryservice.max-endpoints
Change the key of a spring application property
oldPropertyKey:
spring.couchbase.env.endpoints.view
newPropertyKey:
spring.couchbase.env.endpoints.viewservice.max-endpoints
Change the key of a spring application property
oldPropertyKey:
endpoints.auditevents.enabled
newPropertyKey:
management.endpoint.auditevents.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.auditevents.path
newPropertyKey:
management.endpoints.web.path-mapping.auditevents
Change the key of a spring application property
oldPropertyKey:
endpoints.autoconfig.enabled
newPropertyKey:
management.endpoint.conditions.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.autoconfig.path
newPropertyKey:
management.endpoints.web.path-mapping.conditions
Change the key of a spring application property
oldPropertyKey:
endpoints.beans.enabled
newPropertyKey:
management.endpoint.beans.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.beans.path
newPropertyKey:
management.endpoints.web.path-mapping.beans
Change the key of a spring application property
oldPropertyKey:
endpoints.configprops.enabled
newPropertyKey:
management.endpoint.configprops.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.configprops.keys-to-sanitize
newPropertyKey:
management.endpoint.configprops.keys-to-sanitize
Change the key of a spring application property
oldPropertyKey:
endpoints.configprops.path
newPropertyKey:
management.endpoints.web.path-mapping.configprops
Change the key of a spring application property
oldPropertyKey:
endpoints.cors.allow-credentials
newPropertyKey:
management.endpoints.web.cors.allow-credentials
Change the key of a spring application property
oldPropertyKey:
endpoints.cors.allowed-headers
newPropertyKey:
management.endpoints.web.cors.allowed-headers
Change the key of a spring application property
oldPropertyKey:
endpoints.cors.allowed-methods
newPropertyKey:
management.endpoints.web.cors.allowed-methods
Change the key of a spring application property
oldPropertyKey:
endpoints.cors.allowed-origins
newPropertyKey:
management.endpoints.web.cors.allowed-origins
Change the key of a spring application property
oldPropertyKey:
endpoints.cors.exposed-headers
newPropertyKey:
management.endpoints.web.cors.exposed-headers
Change the key of a spring application property
oldPropertyKey:
endpoints.cors.max-age
newPropertyKey:
management.endpoints.web.cors.max-age
Change the key of a spring application property
oldPropertyKey:
endpoints.dump.enabled
newPropertyKey:
management.endpoint.threaddump.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.dump.path
newPropertyKey:
management.endpoints.web.path-mapping.dump
Change the key of a spring application property
oldPropertyKey:
endpoints.enabled
newPropertyKey:
management.endpoints.enabled-by-default
Change the key of a spring application property
oldPropertyKey:
endpoints.env.enabled
newPropertyKey:
management.endpoint.env.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.env.keys-to-sanitize
newPropertyKey:
management.endpoint.env.keys-to-sanitize
Change the key of a spring application property
oldPropertyKey:
endpoints.env.path
newPropertyKey:
management.endpoints.web.path-mapping.env
Change the key of a spring application property
oldPropertyKey:
endpoints.flyway.enabled
newPropertyKey:
management.endpoint.flyway.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.health.enabled
newPropertyKey:
management.endpoint.health.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.health.mapping
newPropertyKey:
management.health.status.http-mapping
Change the key of a spring application property
oldPropertyKey:
endpoints.health.path
newPropertyKey:
management.endpoints.web.path-mapping.health
Change the key of a spring application property
oldPropertyKey:
endpoints.health.time-to-live
newPropertyKey:
management.endpoint.health.cache.time-to-live
Change the key of a spring application property
oldPropertyKey:
endpoints.heapdump.enabled
newPropertyKey:
management.endpoint.heapdump.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.heapdump.path
newPropertyKey:
management.endpoints.web.path-mapping.heapdump
Change the key of a spring application property
oldPropertyKey:
endpoints.info.enabled
newPropertyKey:
management.endpoint.info.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.info.path
newPropertyKey:
management.endpoints.web.path-mapping.info
Change the key of a spring application property
oldPropertyKey:
endpoints.jmx.domain
newPropertyKey:
management.endpoints.jmx.domain
Change the key of a spring application property
oldPropertyKey:
endpoints.jmx.enabled
newPropertyKey:
management.endpoints.jmx.exposure.exclude
Change the key of a spring application property
oldPropertyKey:
endpoints.jmx.static-names
newPropertyKey:
management.endpoints.jmx.static-names
Change the key of a spring application property
oldPropertyKey:
endpoints.jmx.unique-names
newPropertyKey:
management.endpoints.jmx.unique-names
Change the key of a spring application property
oldPropertyKey:
endpoints.jolokia.enabled
newPropertyKey:
management.endpoint.jolokia.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.jolokia.path
newPropertyKey:
management.endpoints.web.path-mapping.jolokia
Change the key of a spring application property
oldPropertyKey:
endpoints.liquibase.enabled
newPropertyKey:
management.endpoint.liquibase.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.logfile.enabled
newPropertyKey:
management.endpoint.logfile.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.logfile.external-file
newPropertyKey:
management.endpoint.logfile.external-file
Change the key of a spring application property
oldPropertyKey:
endpoints.logfile.path
newPropertyKey:
management.endpoints.web.path-mapping.logfile
Change the key of a spring application property
oldPropertyKey:
endpoints.loggers.enabled
newPropertyKey:
management.endpoint.loggers.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.loggers.path
newPropertyKey:
management.endpoints.web.path-mapping.loggers
Change the key of a spring application property
oldPropertyKey:
endpoints.mappings.enabled
newPropertyKey:
management.endpoint.mappings.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.mappings.path
newPropertyKey:
management.endpoints.web.path-mapping.mappings
Change the key of a spring application property
oldPropertyKey:
endpoints.metrics.enabled
newPropertyKey:
management.endpoint.metrics.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.metrics.path
newPropertyKey:
management.endpoints.web.path-mapping.metrics
Change the key of a spring application property
oldPropertyKey:
endpoints.shutdown.enabled
newPropertyKey:
management.endpoint.shutdown.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.shutdown.path
newPropertyKey:
management.endpoints.web.path-mapping.shutdown
Change the key of a spring application property
oldPropertyKey:
endpoints.trace.filter.enabled
newPropertyKey:
management.trace.http.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.trace.enabled
newPropertyKey:
management.endpoint.httptrace.enabled
Change the key of a spring application property
oldPropertyKey:
endpoints.trace.path
newPropertyKey:
management.endpoints.web.path-mapping.httptrace
Change the key of a spring application property
oldPropertyKey:
jolokia.config
newPropertyKey:
management.endpoint.jolokia.config
Change the key of a spring application property
oldPropertyKey:
management.add-application-context-header
newPropertyKey:
management.server.add-application-context-header
Change the key of a spring application property
oldPropertyKey:
management.address
newPropertyKey:
management.server.address
Change the key of a spring application property
oldPropertyKey:
management.context-path
newPropertyKey:
management.server.servlet.context-path
Change the key of a spring application property
oldPropertyKey:
management.port
newPropertyKey:
management.server.port
Change the key of a spring application property
oldPropertyKey:
management.ssl.ciphers
newPropertyKey:
management.server.ssl.ciphers
Change the key of a spring application property
oldPropertyKey:
management.ssl.client-auth
newPropertyKey:
management.server.ssl.client-auth
Change the key of a spring application property
oldPropertyKey:
management.ssl.enabled
newPropertyKey:
management.server.ssl.enabled
Change the key of a spring application property
oldPropertyKey:
management.ssl.enabled-protocols
newPropertyKey:
management.server.ssl.enabled-protocols
Change the key of a spring application property
oldPropertyKey:
management.ssl.key-alias
newPropertyKey:
management.server.ssl.key-alias
Change the key of a spring application property
oldPropertyKey:
management.ssl.key-password
newPropertyKey:
management.server.ssl.key-password
Change the key of a spring application property
oldPropertyKey:
management.ssl.key-store
newPropertyKey:
management.server.ssl.key-store
Change the key of a spring application property
oldPropertyKey:
management.ssl.key-store-password
newPropertyKey:
management.server.ssl.key-store-password
Change the key of a spring application property
oldPropertyKey:
management.ssl.key-store-provider
newPropertyKey:
management.server.ssl.key-store-provider
Change the key of a spring application property
oldPropertyKey:
management.ssl.key-store-type
newPropertyKey:
management.server.ssl.key-store-type
Change the key of a spring application property
oldPropertyKey:
management.ssl.protocol
newPropertyKey:
management.server.ssl.protocol
Change the key of a spring application property
oldPropertyKey:
management.ssl.trust-store
newPropertyKey:
management.server.ssl.trust-store
Change the key of a spring application property
oldPropertyKey:
management.ssl.trust-store-password
newPropertyKey:
management.server.ssl.trust-store-password
Change the key of a spring application property
oldPropertyKey:
management.ssl.trust-store-provider
newPropertyKey:
management.server.ssl.trust-store-provider
Change the key of a spring application property
oldPropertyKey:
management.ssl.trust-store-type
newPropertyKey:
management.server.ssl.trust-store-type
Change the key of a spring application property
oldPropertyKey:
management.trace.include
newPropertyKey:
management.trace.http.include
Change the key of a spring application property
oldPropertyKey:
spring.metrics.export.statsd.host
newPropertyKey:
management.metrics.export.statsd.host
Change the key of a spring application property
oldPropertyKey:
spring.metrics.export.statsd.port
newPropertyKey:
management.metrics.export.statsd.port
See how this recipe works across multiple open-source repositories
The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories.
Please contact Moderne for more information about safely running the recipes on your own codebase in a private SaaS.
Contributors
Tyler Van Gorder, Knut Wannheden, Nick McKinney, Patrick, Tim te Beek, Jonathan Schnéider, Kyle Scully
Last updated