随笔分类 - groovy高级
摘要:def printSomething(param){ println param } def printSomething(param01,param02){ println param01+" "+param02 } printSomething("hello") printSomething("
        阅读全文
            
摘要:为什么要使用闭包 # 参考 https://juejin.cn/post/6844903878111019022 # 闭包模板 def closure4 = { x, y -> println("x is ${x}, y is ${y}") } // 省略类型 Closure closure6 = 
        阅读全文
            
摘要:show = { println it } square_root = { Math.sqrt(it) } def please(action) { [the: { what -> [of: { n -> action(what(n)) }] }] } please show the square_
        阅读全文
            
摘要:def retry(int times = 5, Closure errorHandler = {e-> log.warn(e.message,e)} , Closure body) { int retries = 0 def exceptions = [] while(retries++ < ti
        阅读全文
            
浙公网安备 33010602011771号