From 649f2dec53f43b3ef0039dddac7b3031a29418e9 Mon Sep 17 00:00:00 2001 From: Christopher Ramey Date: Thu, 23 Aug 2012 22:00:36 +0000 Subject: [PATCH] Added global driver and url parameters --- src/com/binarythought/jdbcjson/JDBCJSON.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/com/binarythought/jdbcjson/JDBCJSON.java b/src/com/binarythought/jdbcjson/JDBCJSON.java index 62aff89..5072a7e 100644 --- a/src/com/binarythought/jdbcjson/JDBCJSON.java +++ b/src/com/binarythought/jdbcjson/JDBCJSON.java @@ -64,6 +64,7 @@ public class JDBCJSON public void run(String job) throws Exception { String url = properties.getProperty(job + ".url"); + if(url == null){ url = properties.getProperty(".url"); } String sql = properties.getProperty(job + ".sql"); if(sql == null){ sql = "SELECT * FROM " + job; } @@ -72,6 +73,7 @@ public class JDBCJSON if(out == null){ out = job + ".json"; } String driver = properties.getProperty(job + ".driver"); + if(driver == null){ driver = properties.getProperty(".driver"); } if(driver != null){ Class.forName(driver); } Connection conn = null;