Skip to content

PropertySourcesPlaceholderConfigurer ignores ignoreUnresolvablePlaceholders flag #27947

Closed
@sbrannen

Description

@sbrannen

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.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions