commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tan Kah Siong <jax7...@yahoo.com.sg>
Subject Configuration: Value not overriding
Date Thu, 28 Jul 2005 06:54:49 GMT
Hi.

I need to clarify the following about commons
configuration.

Commons configuration can make use of a substitution
technique as follows.

file: application1.properties
key1 = ${key2}
key2 = key2value
key3 = key3value

This will result in key1=key2value

Now, say i got another file

file: application2.properties
key2 = keyXvalue

This file is loaded into a compositeconfiguration as
follows,

CompositeConfiguration config = new
CompositeConfiguration();
config.addConfiguration(new
PropertiesConfiguration("application1.properties"));
config.addConfiguration(new
PropertiesConfiguration("application2.properties"));

Will key2 now be key2value or keyXvalue or an array of
both?
Consequently, will key1 be key2value or keyXvalue
after application2.properties is loaded?

Please advice.



 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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