commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "paco de lucia" <rass.e...@googlemail.com>
Subject [configuration] ConfigurationConverter, PropertiesConfiguration and properties interpolation
Date Thu, 01 Jun 2006 12:54:55 GMT
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

---------------------------------------------------------------------
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