I have a Spring 4.3 custom PropertyPlaceholderConfigurer that does extra processing on values read from the properties files before injection:
public class MyPropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer{
@Override
protected String convertPropertyValue(final String originalValue) { ... }
@Override
protected String resolveSystemProperty(final String key) {
return convertPropertyValue(super.resolveSystemProperty(key));
}
}
My problem is that bean fields that are annotated for injection with property values, eg. @Value("${some_property}"), are in fact injected with the raw value read from the property source without my custom processing.
After some debugging I found that I should have also overiden
com.ec.survey.security.SafePasswordPropertyPlaceholderConfigurer#resolvePlaceholder