首页 > 其他 > 详细

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

时间:2016-05-22 23:05:57      阅读:249      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!