Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
sql.eachRow( query ) { columns -> println columns.firstname //executes well Eval.me( "columns.firstname" ) //No such property: columns }
如何评估包含闭包变量的字符串columns?
columns
您可以使用3 参数形式Eval.me:
Eval.me
Eval.me( 'columns', columns, 'columns.firstname' )