title: Spring property loading - decrypting encrypted properties on the fly
body: <p>I'm using the latest property loading mechanism exposed by spring- PropertySourcesPlaceholderConfigurer, and trying to decrypt the encrypted properties on the fly. Will PropertyPlaceholderConfigurer I could override resolvePlaceholder, and add the decryption mechanism to it.</p>
  
  <p>However, I can't figure out how to do it in PropertySourcesPlaceholderConfigurer. Have tried overriding processProperties, and passing in my custom ConfigurablePropertyResolver[with getProperty Overriden] but this doesn't work.</p>
  
  <pre><code>MutablePropertySources propertySources = new MutablePropertySources();
  
  try {
      propertySources.addFirst(getExtendPortsProperties());
      propertySources.addFirst(new ResourcePropertySource("classpath:/X.properties"));
      propertySources.addFirst(new ResourcePropertySource("classpath:/Y.properties"));
  } catch (IOException e) {
      throw new RuntimeException("failed to read property source", e);
  }
  </code></pre>
  
  <p>This is how I read the properties. And then,</p>
  
  <pre><code>PropertySourcesPlaceholderConfigurer result = new PropertySourcesPlaceholderConfigurer();
  result.setPropertySources(firePropertiesSources);
  </code></pre>
  
  <p>That's how I set the properties.</p>
  
  <p>Now, one of the properties in these props is encrypted, and I need to to instruct Spring to decrypt that before substituting placeholders with the actual values.[I need to specify my custom implementation]</p>