您的位置:首页 > 编程语言 > Java开发

java代码获取jdbc链接properties

2015-12-14 17:32 369 查看
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;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: