Skip to content

Escaped character in nested placeholder not detected properly and leads to invalid parts #34289

Closed
@semeiskii

Description

@semeiskii

Problem
After upgrade from Spring Boot 3.3 to Spring Boot 3.4 a property which uses custom loader and contains placeholder inside it is not resolved properly.

application.yaml:

spring:
  config:
    import: sm-stub://

app:
  environment: qa
  a-service-url: ${sm-stub\://projects/my-project/secrets/${app.environment}_a-service_url/versions/latest}

In the application:

@Value("${app.a-service-url}")
private String aServiceUrl;

The resolved value is "//projects/my-project/secrets/qa_a-service_url/versions/latest" [NOK]
Expected value is the one returned by the custom property source for the "projects/my-project/secrets/qa_a-service_url/versions/latest" location.

Minimal reproducible example
https://github.com/semeiskii/spring-boot-property-resolving-bug

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions