Property replacement support in our Spring extensible XML authoring ?

Tom Zeller tzeller at dragonacea.biz
Tue Apr 1 12:55:56 EDT 2014


>> Did you figure out how to do property replacement in our custom XML
>> configs, for example attribute-resolver.xml ?
>
> I use a couple of things to make this work.  In the tests I include a bean
> file which has the property replacement language in it alongside the file
> under test. For the real config we inherit the properties from the
> configuration.

For the testbed, I needed to add the property placeholder to the app ctx :

  <util:list id ="shibboleth.AttributeResolverResources">
    <value>file://${idp.home}/conf/attribute-resolver.xml</value>
    <!-- To support property replacement -->
    <value>file://${idp.home}/conf/property-placeholder.xml</value>
  </util:list>

where property-placeholder.xml is :

  <beans ...
    <context:property-placeholder
location="file://${idp.home}/conf/idp.properties" />
  </beans>

which emulates the tests.


More information about the dev mailing list