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

  • 9628

Deliverables

  • [x] Ensure that unresolvable placeholders are always ignored if the ignoreUnresolvablePlaceholders flag in PropertySourcesPlaceholderConfigurer is set to true.