人都不能访问属性文件这样的:是否有Groovier方法来访问属性文件?
def props = new Properties()
new File('my.props').withInputStream { props.load(it) }
assert props.foo == 'bar'
我认为这是相当繁琐的。难道不是更加方便吗?
// does not compile
def props = Properties.from(new File('my.props'))
assert props.foo == 'bar'