问题
<#assign blah = "foo">
<#assign foo = "awesome">
Can we render "awesome" without referencing foo ?
I tried something like ${${blah}}
But it isn't working, any ideas ?
回答1:
There is an eval built-in which evaluates a string as an FTL expression.
In your case use it like this:
${blah?eval}
来源:https://stackoverflow.com/questions/21276930/get-value-of-the-string-stored-in-a-variable-whose-name-stored-as-string-in-ano