ApplicationContextInitializer and contextConfigLocation ?

Tom Zeller tzeller at dragonacea.biz
Thu Jun 12 14:37:45 EDT 2014


Hey Brent,

It looks to me like contextConfigLocation property replacement does
not work for property sources added by an
ApplicationContextInitializer. Do you know if that is true ?

My test web.xml looks like :

 <context-param>
  <param-name>contextInitializerClasses</param-name>
  <param-value>net.shibboleth.idp.spring.IdPApplicationContextInitializer</param-value>
 </context-param>

 <context-param>
   <param-name>contextConfigLocation</param-name>
    <param-value>${idp.home:}/system/conf/global-system.xml
${idp.home:}/conf/global.xml</param-value>
 </context-param>

and I know idp.home is set as a property because I have it logged, but
an exception is thrown :

 Caused by: java.io.FileNotFoundException: Could not open
ServletContext resource [/system/conf/global-system.xml]

So ${idp.home:} is defaulting to "" instead of being replaced by the
value set by the property source via the app ctx initializer.

For reference, here is the previous thread :
 [1] http://shibboleth.net/pipermail/dev/2014-May/004053.html


More information about the dev mailing list