见例子:就在这一行:operationImplService."${processAction}"(params1,params2)
def operationImplService def test() { def processAction = "dm" def postResult = operationImplService."${processAction}"('abc') println "postResult:"+postResult } } class OperationImplService { def dm(String param) { println "调用我了,参数:${param}" return true } }
多个动态实参未测试,例子:
def arg = [1,2] def tools = new Tools() println tools."max"(*arg)