开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜