openrewrite / openrewrite/rewrite-spring
Recipe to migrate properties configuration to yaml configuration (and vice versa)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 403
- Forks
- 149
- Avg merge
- 2h 33m
- Merged PRs (30d)
- 10
Description
What problem are you trying to solve?
Migration of an existing application that uses properties for Spring configuration to use of YAML for Spring configuration.
What precondition(s) should be checked before applying this recipe?
Existence of application*.properties files.
Describe the situation before applying the recipe
src/main/resources/config/application.properties
server.port=${PORT:8080}
logging.level.org.atmosphere = warn
spring.mustache.check-template-location = false
Describe the situation after applying the recipe
src/main/resources/config/application.yml
server:
port: ${PORT:8080}
logging:
level:
org.atmosphere: warn
spring:
mustache:
check-template-location: false
Have you considered any alternatives or workarounds?
Any additional context
Are you interested in contributing this recipe to OpenRewrite?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing OpenRewrite Spring recipe entry points and tests for configuration-file migrations. Use the application*.properties precondition and the before/after examples in this issue to define the expected transformation in both directions. Done means the recipe handles the shown nested YAML structure and preserves the configuration values when converting between properties and YAML.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, yaml
- Domain
- backend, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100