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

PropertySourcesPlaceholderConfigurer ignores ignoreUnresolvablePlaceholders flag #27947

Closed
1 task done
sbrannen opened this issue Jan 18, 2022 · 0 comments
Closed
1 task done
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Milestone

Comments

@sbrannen
Copy link
Member

sbrannen commented Jan 18, 2022

Overview

If a PropertySourcesPlaceholderConfigurer bean has its ignoreUnresolvablePlaceholders flag set to true, that flag is not always honored when asking the Environment to resolve a property containing placeholders.

As a consequence, given a property declared as my.app.var = ${var} without a corresponding var property declared, an attempt to resolve @Value("${my.app.var}") will result in the following exception.

java.lang.IllegalArgumentException: Could not resolve placeholder 'var' in value "${var}"

Related Issues

Deliverables

  • Ensure that unresolvable placeholders are always ignored if the ignoreUnresolvablePlaceholders flag in PropertySourcesPlaceholderConfigurer is set to true.
@sbrannen sbrannen added type: bug A general bug in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 18, 2022
@sbrannen sbrannen added this to the 5.3.16 milestone Jan 18, 2022
@sbrannen sbrannen self-assigned this Jan 18, 2022
sbrannen added a commit that referenced this issue Jan 18, 2022
This change is required in Eclipse IDE but not for the Gradle build.

See gh-27947
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant