Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Boot properties migrator can create circular references #35919

Closed
kzwang opened this issue Jun 15, 2023 · 1 comment
Closed

Spring Boot properties migrator can create circular references #35919

kzwang opened this issue Jun 15, 2023 · 1 comment
Labels
type: bug A general bug
Milestone

Comments

@kzwang
Copy link

kzwang commented Jun 15, 2023

In our configuration metadata json file, we have this old property defined

{
      "name": "oldProp",
      "defaultValue": "${newProp}",
      "deprecation": {
        "replacement": "newProp"
      }
}

We have a separate properties file that defines oldProp=${newProp} to keep backward compatibility (the reason for defaultValue), and we still want IntelliJ (and other tools that read the metadata file) to replace oldProp to newProp (the reason for replacement).

Spring Boot properties migrator automatically creates a migrate-* property source with newProp=${newProp}, which is causing a circular placeholder reference issue when we try to get the property.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 15, 2023
@philwebb
Copy link
Member

I think we could detect these direct cycles and not add the migration property entry.

@philwebb philwebb added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 15, 2023
@philwebb philwebb added this to the 2.7.x milestone Jun 15, 2023
@philwebb philwebb changed the title Spring Boot properties migrator creating circular reference Spring Boot properties migrator can create circular references Jun 15, 2023
@philwebb philwebb modified the milestones: 2.7.x, 2.7.13 Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants