Migrate Spring Boot properties to 2.4
org.openrewrite.java.spring.boot2.SpringBootProperties_2_4
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.15.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.
Data Tables
Source files that had results
org.openrewrite.table.SourcesFileResults
Source files that were modified by the recipe run.
Column Name | Description |
---|---|
Source path before the run | The source path of the file before the run. |
Source path after the run | A recipe may modify the source path. This is the path after the run. |
Parent of the recipe that made changes | In a hierarchical recipe, the parent of the recipe that made a change. Empty if this is the root of a hierarchy or if the recipe is not hierarchical at all. |
Recipe that made changes | The specific recipe that made a change. |
Estimated time saving | An estimated effort that a developer to fix manually instead of using this recipe, in unit of seconds. |
Cycle | The recipe cycle in which the change was made. |
Source files that errored on a recipe
org.openrewrite.table.SourcesFileErrors
The details of all errors produced by a recipe run.
Column Name | Description |
---|---|
Source path | The file that failed to parse. |
Recipe that made changes | The specific recipe that made a change. |
Stack trace | The stack trace of the failure. |
Recipe performance
org.openrewrite.table.RecipeRunStats
Statistics used in analyzing the performance of recipes.
Column Name | Description |
---|---|
The recipe | The recipe whose stats are being measured both individually and cumulatively. |
Source file count | The number of source files the recipe ran over. |
Source file changed count | The number of source files which were changed in the recipe run. Includes files created, deleted, and edited. |
Cumulative scanning time | The total time spent across the scanning phase of this recipe. |
99th percentile scanning time | 99 out of 100 scans completed in this amount of time. |
Max scanning time | The max time scanning any one source file. |
Cumulative edit time | The total time spent across the editing phase of this recipe. |
99th percentile edit time | 99 out of 100 edits completed in this amount of time. |
Max edit time | The max time editing any one source file. |
Usage
This recipe has no required configuration options. It can be activated by adding a dependency on org.openrewrite.recipe:rewrite-spring:5.15.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:
management.server.servlet.context-path
newPropertyKey:
management.server.base-path
Change the key of a spring application property
oldPropertyKey:
logging.file.clean-history-on-start
newPropertyKey:
logging.logback.rollingpolicy.clean-history-on-start
Change the key of a spring application property
oldPropertyKey:
logging.file.max-history
newPropertyKey:
logging.logback.rollingpolicy.max-history
Change the key of a spring application property
oldPropertyKey:
logging.file.max-size
newPropertyKey:
logging.logback.rollingpolicy.max-file-size
Change the key of a spring application property
oldPropertyKey:
logging.file.total-size-cap
newPropertyKey:
logging.logback.rollingpolicy.total-size-cap
Change the key of a spring application property
oldPropertyKey:
logging.pattern.rolling-file-name
newPropertyKey:
logging.logback.rollingpolicy.file-name-pattern
Change the key of a spring application property
oldPropertyKey:
spring.profiles
newPropertyKey:
spring.config.activate.on-profile
except:
[active, default, group, include]
Change the key of a spring application property
oldPropertyKey:
spring.data.mongodb.grid-fs-database
newPropertyKey:
spring.data.mongodb.gridfs.database
Change the key of a spring application property
oldPropertyKey:
spring.data.neo4j.password
newPropertyKey:
spring.neo4j.authentication.password
Change the key of a spring application property
oldPropertyKey:
spring.data.neo4j.repositories.enabled
newPropertyKey:
spring.data.neo4j.repositories.type
Change the key of a spring application property
oldPropertyKey:
spring.data.neo4j.uri
newPropertyKey:
spring.neo4j.uri
Change the key of a spring application property
oldPropertyKey:
spring.data.neo4j.username
newPropertyKey:
spring.neo4j.authentication.password
Change the key of a spring application property
oldPropertyKey:
spring.mvc.locale
newPropertyKey:
spring.web.locale
Change the key of a spring application property
oldPropertyKey:
spring.mvc.locale-resolver
newPropertyKey:
spring.web.locale-resolver
Change the key of a spring application property
oldPropertyKey:
spring.resources.add-mappings
newPropertyKey:
spring.web.resources.add-mappings
Change the key of a spring application property
oldPropertyKey:
spring.resources.cache.cachecontrol.cache-private
newPropertyKey:
spring.web.resources.cache.cachecontrol.cache-private
Change the key of a spring application property
oldPropertyKey:
spring.resources.cache.cachecontrol.cache-public
newPropertyKey:
spring.web.resources.cache.cachecontrol.cache-public
Change the key of a spring application property
oldPropertyKey:
spring.resources.cache.cachecontrol.max-age
newPropertyKey:
spring.web.resources.cache.cachecontrol.max-age
Change the key of a spring application property
oldPropertyKey:
spring.resources.cache.cachecontrol.must-revalidate
newPropertyKey:
spring.web.resources.cache.cachecontrol.must-revalidate
Change the key of a spring application property
oldPropertyKey:
spring.resources.cache.cachecontrol.no-cache
newPropertyKey:
spring.web.resources.cache.cachecontrol.no-cache
Change the key of a spring application property
oldPropertyKey:
spring.resources.cache.cachecontrol.no-store
newPropertyKey:
spring.web.resources.cache.cachecontrol.no-store
Change the key of a spring application property
oldPropertyKey:
spring.resources.cache.cachecontrol.no-transform
newPropertyKey:
spring.web.resources.cache.cachecontrol.no-transform
Change the key of a spring application property
oldPropertyKey:
spring.resources.cache.cachecontrol.proxy-revalidate
newPropertyKey:
spring.web.resources.cache.cachecontrol.proxy-revalidate
Change the key of a spring application property
oldPropertyKey:
spring.resources.cache.cachecontrol.s-max-age
newPropertyKey:
spring.web.resources.cache.cachecontrol.s-max-age
Change the key of a spring application property
oldPropertyKey:
spring.resources.cache.cachecontrol.stale-if-error
newPropertyKey:
spring.web.resources.cache.cachecontrol.stale-if-error
Change the key of a spring application property
oldPropertyKey:
spring.resources.cache.cachecontrol.stale-while-revalidate
newPropertyKey:
spring.web.resources.cache.cachecontrol.stale-while-revalidate
Change the key of a spring application property
oldPropertyKey:
spring.resources.cache.period
newPropertyKey:
spring.web.resources.cache.period
Change the key of a spring application property
oldPropertyKey:
spring.resources.cache.use-last-modified
newPropertyKey:
spring.web.resources.cache.use-last-modified
Change the key of a spring application property
oldPropertyKey:
spring.resources.chain.cache
newPropertyKey:
spring.web.resources.chain.cache
Change the key of a spring application property
oldPropertyKey:
spring.resources.chain.compressed
newPropertyKey:
spring.web.resources.chain.compressed
Change the key of a spring application property
oldPropertyKey:
spring.resources.chain.enabled
newPropertyKey:
spring.web.resources.chain.enabled
Change the key of a spring application property
oldPropertyKey:
spring.resources.chain.strategy.content.enabled
newPropertyKey:
spring.web.resources.chain.strategy.content.enabled
Change the key of a spring application property
oldPropertyKey:
spring.resources.chain.strategy.content.paths
newPropertyKey:
spring.web.resources.chain.strategy.content.paths
Change the key of a spring application property
oldPropertyKey:
spring.resources.chain.strategy.fixed.enabled
newPropertyKey:
spring.web.resources.chain.strategy.fixed.enabled
Change the key of a spring application property
oldPropertyKey:
spring.resources.chain.strategy.fixed.paths
newPropertyKey:
spring.web.resources.chain.strategy.fixed.paths
Change the key of a spring application property
oldPropertyKey:
spring.resources.chain.strategy.fixed.version
newPropertyKey:
spring.web.resources.chain.strategy.fixed.version
Change the key of a spring application property
oldPropertyKey:
spring.resources.static-locations
newPropertyKey:
spring.web.resources.static-locations
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