openrewrite / openrewrite/rewrite-spring

2.4-2.5: Flyway and Liquibase JDBC URLs

Open
#131 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

boot-2.5 recipe
Dominant language
Java
Stars
403
Forks
149
Avg merge
2h 33m
Merged PRs (30d)
10

Description

may-require: openrewrite/rewrite/issues/1315

Release Notes
If you currently define a spring.flyway.url or spring.liquibase.url you may need to provide additional username and password properties. In earlier versions of Spring Boot, these settings were derived from spring.datasource properties but this turned out to be problematic for people that provided their own DataSource beans.

Condition

Recipe is applicable if

  • flyway or liquibase dependency is found on classpath OR (maybe better) flyway or liquibase config files are found (blocked-by openrewrite/rewrite/issues/1324)
  • Just checking the existence of named properties is not guaranteed to be sufficient as these might theoretically be provided as env and not exist in any properties file
Description

tool = [flyway|liquibase]

The recipe found a dependency to ${tool}.
If you are using credentials to run the database migrations using ${tool} you should provide the database credentials:
spring.${tool}.user and spring.${tool}.password

Resources

https://docs.spring.io/spring-boot/docs/2.5.8/reference/htmlsingle/#application-properties.data-migration

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 with the condition and description in this issue, then review the linked OpenRewrite issues 1315 and 1324 for dependency and configuration detection context. Done means defining the Flyway and Liquibase migration-credential guidance while resolving the stated applicability questions.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
databases
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.