csanders a écrit :

We have a project that uses Velocity, which uses ExtendedProperties, which we want to extend to interpolate environmental variables and system properties.

Does anyone have any objection / suggestion for this ? Is we write the patch is this something that could be included ?

An alternative is to build a Configuration with Commons Configuration that performs the interpolation you want, and then turn it into an ExtendedProperties.

The code would look like this:

CompositeConfiguration config = new CompositeConfiguration();
config.addConfiguration(new SystemConfiguration());
config.addConfiguration(new EnvironmentConfiguration());
config.addConfiguration(new PropertiesConfiguration("conf.properties"));

ExtendedProperties props = ConfigurationConverter.getExtendedProperties(config);


Emmanuel Bourg



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to