Update TSDBDriver.java

多数据源下,driver驱动根据acceptsURL判断url使用合适的驱动,增加判断TAOS驱动
This commit is contained in:
sunguofeng 2020-05-25 17:25:08 +08:00 committed by GitHub
parent dfbe9ace8a
commit d3aaceedb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -188,7 +188,7 @@ public class TSDBDriver implements java.sql.Driver {
}
public boolean acceptsURL(String url) throws SQLException {
return true;
return StringUtils.isNotBlank(url) && url.startsWith(URL_PREFIX);
}
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException {
@ -355,4 +355,4 @@ public class TSDBDriver implements java.sql.Driver {
public String database(Properties props) {
return props.getProperty(PROPERTY_KEY_DBNAME);
}
}
}