Yep, here is the code:
CompositeConfiguration config = new CompositeConfiguration();
config.addConfiguration(new SystemConfiguration());
config.addConfiguration(new EnvironmentConfiguration());
config.addConfiguration(new
PropertiesConfiguration(Config.velocity_properties_file));
System.out.println(config.getProperty("file.resource.loader.path") );
System.out.println(config.getProperty("TEMPLATE_HOME") );
ExtendedProperties configuration =
ConfigurationConverter.getExtendedProperties(config);
TEMPLATE_HOME is the env var, and the getProperty() does expand it, but
the file.resource.loader.path just returns ${TEMPLATE_HOME} .
Thanks,
Charlie
Emmanuel Bourg wrote:
csanders a écrit :
I'm having a little trouble getting the interpolation to work, I have
a properties file with contents similar to:
---
file.resource.loader.path = ${VELOCITY_TEMPLATE_HOME}
---
Where VELOCITY_TEMPLATE_HOME is an environmental variable that I need
to get expanded , how would I do this ?
Did you try the composite configuration example I gave in my previous
message ?
Emmanuel Bourg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]