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: [configuration] ConfigurationConverter, PropertiesConfiguration and properties interpolation
Date Thu, 01 Jun 2006 20:00:59 GMT
paco de lucia wrote:
> I have the following properties file named work.properties:
> country=uk
> city=${country}/london
> 
> 
> I would like to use those properties in a bean as properties and not
> as a configuration. I used the following method to load them:
> 
> MyBean  b = new MyBean();
> Properties workProps = ConfigurationConverter
>                                .getProperties(new
> PropertiesConfiguration("work.properties"))
> b.setWorkProperties(workProps)
> 
> I am expecting that workProps looks like this:
> country=uk
> city=uk/london
> 
> but apparently the substitution of interpolated properties takes place
> only if one calls a method in Configuration (i.e. getString(key)).
> 
> Is there a way to achieve this?
> 
> Thanks!
> 
> Aziz
> 
Which version of Commons Configuration do you use? I had a look at the 
source code and it seems that the interpolation method gets called for 
all copied properties.

Can you try again with the latest code from subversion?

Thanks
Oliver

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


Mime
View raw message