-
Notifications
You must be signed in to change notification settings - Fork 5
Properties Substitution_97255449
nxi edited this page Apr 9, 2015
·
1 revision
Created by Tony Lam, last modified on Jul 06, 2009
ANT supports string substitution by using properties. For example, if you have a property
Then you can use the property key in the XML script
This will be resolve in runtime as text = abc.
GumTree provides similar functionality via org.gumtree.core.util.PropertiesHelper. The constrain on this is it only fetch property value from the system properties (additional application properties are preloaded by org.gumtree.configurator during application startup). To use this feature, simply refactor your corresponding model setter method from
to
myProperty = abc
<echo text=${myProperty} />
This will be resolve in runtime as text = abc.
GumTree provides similar functionality via org.gumtree.core.util.PropertiesHelper. The constrain on this is it only fetch property value from the system properties (additional application properties are preloaded by org.gumtree.configurator during application startup). To use this feature, simply refactor your corresponding model setter method from
public void setClassname(String classname) { this.classname = classname; }
public void setClassname(String classname) { this.classname = PropertiesHelper.substitueWithProperties(classname); }
Document generated by Confluence on Apr 01, 2015 00:11
Home | Developer Guide | Copyright © 2013 ANSTO