groovy switch判断
groovy switch判断
条件判断
//定义参数
def color = "red"
//switch判断
switch(color) {
case "red":
println("red")
break
case "blue":
println("blue")
break
//当匹配不到时
default:
println("No matching case found!!");
}