openrewrite / openrewrite/rewrite-spring

Recipe to migrate properties configuration to yaml configuration (and vice versa)

Open
#509 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

recipe
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.