[Groovy]Parse properties file in Groovy

def props = new Properties()
new File("foo.properties").withInputStream { s ->
  props.load(s) 
}
println props
原文地址:https://www.cnblogs.com/buhaiqing/p/4248143.html