How to use setted variables in Config.Groovy and concatenate it
I want to reuse vars setted once again later in Config.groovy
Example:
static.serverURL = "http://static.foo.com"
static.path = ""
bar.default.picUrl=static.serverURL+static.path+"/images/bar.png"
but that gives me a
groovy.util.ConfigObject.plus() is applicable for开发者_Go百科 argument types: (java.lang.String)
changing it to
bar.default.picUrl=""+static.serverURL+static.path+"/images/bar.png"
gives me
[:][:]/images/bar.png
using
bar.default.picUrl=${static.serverURL}+${static.path}+"/images/bar.png"
gives me
nullnull/images/bar.png
Did you try:
bar.default.picUrl="${static.serverURL}${static.path}"/images/bar.png
精彩评论