<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=dfernandez" rel="nofollow">Daniel Fernández</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-8928?redirect=false" rel="nofollow">SPR-8928</a></strong> and commented</p>
<p dir="auto">org.springframework.context.support.PropertySourcesPlaceholderConfigurer is overriding the "postProcessBeanFactory" method defined in org.springframework.beans.factory.config.PropertyResourceConfigurer in order to register the required chain of PropertySource objects that will be use for resolving properties. This makes sense and is OK.</p>
<p dir="auto">But the problem is that the PropertySource object for the local properties (those coming from the "location" attribute and also from the "properties" property) is being created like this:</p>
<p dir="auto">PropertySource&lt;?&gt; localPropertySource =<br>
new PropertiesPropertySource(LOCAL_PROPERTIES_PROPERTY_SOURCE_NAME, this.mergeProperties());</p>
<p dir="auto">...whereas in the original "postProcessBeanFactory" method in PropertyResourceConfigurer these merged properties are post-processed by executing the "convertProperties" method:</p>
<p dir="auto">Properties mergedProps = mergeProperties();<br>
// Convert the merged properties, if necessary.<br>
convertProperties(mergedProps);<br>
// Let the subclass process the properties.<br>
processProperties(beanFactory, mergedProps);</p>
<p dir="auto">This means that the new PropertySourcesPlaceholderConfigurer class never calls "convertProperties", and so disables one of the extension mechanisms of the old pre-3.1 PropertyPlaceholderConfigurer class: overriding the "convertProperty(...)" and "convertPropertyValue(...)" methods.</p>
<p dir="auto">I am jasypt's author <a href="http://www.jasypt.org" rel="nofollow">http://www.jasypt.org</a> and I am creating a Spring3.1-compatible EncryptedPropertySourcesPlaceholderConfigurer, but this bug doesn't allow me to transparently apply property decryption at the "convertProperty" method :-(</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.1 GA</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398190326" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/18574" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/18574/hovercard" href="https://github.com/spring-projects/spring-framework/issues/18574">#18574</a> convertPropertyValue (for reading encrypted values) not working (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398116279" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13603" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13603/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13603">#13603</a> Allow the use of custom PropertySource annotations in <code class="notranslate">@Configuration</code> classes</li>
<li><a href="https://jira.spring.io/browse/SEC-3123" rel="nofollow">SEC-3123</a> Encrypted property value support</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398159720" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/15294" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/15294/hovercard" href="https://github.com/spring-projects/spring-framework/issues/15294">#15294</a> Add encryption support for PropertyPlaceholderConfigurer</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398175791" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/17236" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/17236/hovercard" href="https://github.com/spring-projects/spring-framework/issues/17236">#17236</a> Backport encrypted property functionality from spring-cloud-config environment work</li>
</ul>
<p dir="auto">8 votes, 18 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=mdeinum" rel="nofollow">Marten Deinum</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4238?redirect=false" rel="nofollow">SPR-4238</a></strong> and commented</p>
<p dir="auto">The prop tag doesn´t support a value attribute. It would be nice if it did so we can use the short hand notation. There was some discussion about this in this thread. <a href="http://forum.springframework.org/showthread.php?p=155337#post155337" rel="nofollow">http://forum.springframework.org/showthread.php?p=155337#post155337</a></p>
<hr>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398083766" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8917" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8917/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8917">#8917</a> less verbose xml binding of java.lang.Properties (<em><strong>"duplicates"</strong></em>)</li>
</ul>