Skip to content

Introduce ValuePostProcessor for use with PropertyResolver / Environment [SPR-8373] #13020

@spring-projects-issues

Description

@spring-projects-issues

Chris Beams opened SPR-8373 and commented

Many Spring users are familiar with the idea of 'chaining' BFPPs, with the classic example being a PPC that replaces ${...} with encrypted values from a .properties file followed by a custom BFPP that decrypts those values. There is no straightforward way to make this happen in the current Environment#getProperty world. Consider introducing a ValuePostProcessor mechanism that would allow for this, where (possibly Ordered) VPP instances are registered against the Environment (via its PropertyResolver interface) at context bootstrap time and then act as visitors on any calls to #getProperty methods. VPPs would be invoked prior to type conversion via the Environment's built-in ConversionService for methods where the latter is applicable.


Affects: 3.1 M2

Issue Links:

Metadata

Metadata

Assignees

Labels

status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions