commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Heger <oliver.he...@oliver-heger.de>
Subject Re: [Commons-Configuration]: Nested macro property replacement
Date Thu, 28 Feb 2008 21:47:53 GMT
uma_rk@comcast.net schrieb:
> I am using the latest commons configuration with JDK1.6.
> 
> Could I do the following property replacement using the
> PropertyConfigufrator?
> 
>   propA=value1
>   propB=value2
>   propA.value2.custom=111
>   prop.custom=${propA.${propB}.custom}
> 
> Thanks!
> 
> /U

I think, this is not possible.

Internally configuration uses the StrSubstitutor class from commons lang 
[1] for replacing variables. This class does not seem to support nested 
variables.

Oliver

[1] 
http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/StrSubstitutor.java?view=markup

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message