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

properties获取xml文件的信息语句。

时间:2016-05-22 23:06:27      阅读:123      评论:0      收藏:0      [点我收藏+]

标签:

public class SQLUtil {
/**
 * 加载.properties配置文件
 *
 * @param file
 * @return
 */
 public static Properties loadConfig(String file) {
Properties properties = new Properties();
 try {
 properties.load(ClassLoader.getSystemResourceAsStream(file));
 return properties;
 } catch (IOException e) {
 throw new RuntimeException(e);
 }
 }
}

properties获取xml文件的信息语句。

标签:

原文地址:http://www.cnblogs.com/yongwuqing/p/5518148.html

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