Skip to content

Issue with property resolution with PlaceholderParser #34240

@mbazos

Description

@mbazos

Hi my team has encountered an issue with the latest version of spring-core and unfortunately we don't have a fix but we can replicate it with the sample project below. Let me outline the problem.

Given application.properties like so

gsm\://one=result
key-one=one
key-two=${gsm://${key-one}}
key-three=${gsm://one}

It appears spring-core 6.1.14 would translate property keys key-two and key-three to be result but when upgrading to 6.2.1 it appears the output of these properties have changed. Unfortunately this is causing a breaking change for us and I believe it's probably a bug in spring-core. We narrowed it down to changes in how placeholders are resolved in PlaceholderParse but were unsuccessful in coming up with a reasonable fix.

In addition to the properties above we tried escaping the : as that's a Spring separator but that doesn't seem to fix the issue. The test.zip contains a test which if you switch between spring framework 6.1.14 and 6.2.1 will show the problem.

Please let me know if you have additional questions.

test.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions