首页 > 数据库技术 > 详细

java代码获取jdbc链接properties

时间:2015-12-14 18:52:00      阅读:309      评论:0      收藏:0      [点我收藏+]
public static String getDirPath() {
        Resource resource = null;
        Properties props = null;
        String driverClass = null;
        try {
            resource = new ClassPathResource("/data.properties");
            props = PropertiesLoaderUtils.loadProperties(resource);
            driverClass= (String) props.get("wingPath");
        } catch (IOException e) {
            e.printStackTrace();
        }
        return driverClass;
        
    }

 

java代码获取jdbc链接properties

原文:http://www.cnblogs.com/zrui-xyu/p/5045913.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!