Added global driver and url parameters
This commit is contained in:
parent
5b94df01a4
commit
649f2dec53
@ -64,6 +64,7 @@ public class JDBCJSON
|
|||||||
public void run(String job) throws Exception
|
public void run(String job) throws Exception
|
||||||
{
|
{
|
||||||
String url = properties.getProperty(job + ".url");
|
String url = properties.getProperty(job + ".url");
|
||||||
|
if(url == null){ url = properties.getProperty(".url"); }
|
||||||
|
|
||||||
String sql = properties.getProperty(job + ".sql");
|
String sql = properties.getProperty(job + ".sql");
|
||||||
if(sql == null){ sql = "SELECT * FROM " + job; }
|
if(sql == null){ sql = "SELECT * FROM " + job; }
|
||||||
@ -72,6 +73,7 @@ public class JDBCJSON
|
|||||||
if(out == null){ out = job + ".json"; }
|
if(out == null){ out = job + ".json"; }
|
||||||
|
|
||||||
String driver = properties.getProperty(job + ".driver");
|
String driver = properties.getProperty(job + ".driver");
|
||||||
|
if(driver == null){ driver = properties.getProperty(".driver"); }
|
||||||
if(driver != null){ Class.forName(driver); }
|
if(driver != null){ Class.forName(driver); }
|
||||||
|
|
||||||
Connection conn = null;
|
Connection conn = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user