码迷,mamicode.com
首页 > 其他好文 > 详细

[Groovy] Reading Properties file

时间:2015-06-16 16:40:35      阅读:101      评论:0      收藏:0      [点我收藏+]

标签:

技术分享

Reading Properties file :

Properties prop = new Properties()
def path = "D:\\SoapUIStudy\\application.properties"
FileInputStream fs = new FileInputStream(path)
prop.load(fs)
log.info prop.getProperty("name")

 Result :

Tue Jun 16 15:12:38 CST 2015:INFO:soapUI

[Groovy] Reading Properties file

标签:

原文地址:http://www.cnblogs.com/MasterMonkInTemple/p/4580881.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!