fix: mysql 驱动

This commit is contained in:
taojinlong 2022-04-18 11:01:31 +08:00
parent 575010708b
commit 2069701cb9

View File

@ -285,7 +285,7 @@ public class JdbcProvider extends DefaultJdbcProvider {
MysqlConfiguration mysqlConfiguration = new Gson().fromJson(datasourceRequest.getDatasource().getConfiguration(), MysqlConfiguration.class); MysqlConfiguration mysqlConfiguration = new Gson().fromJson(datasourceRequest.getDatasource().getConfiguration(), MysqlConfiguration.class);
username = mysqlConfiguration.getUsername(); username = mysqlConfiguration.getUsername();
password = mysqlConfiguration.getPassword(); password = mysqlConfiguration.getPassword();
driver = mysqlConfiguration.getDriver(); driver = "com.mysql.jdbc.Driver";
jdbcurl = mysqlConfiguration.getJdbc(); jdbcurl = mysqlConfiguration.getJdbc();
break; break;
case sqlServer: case sqlServer:
@ -382,7 +382,7 @@ public class JdbcProvider extends DefaultJdbcProvider {
case StarRocks: case StarRocks:
MysqlConfiguration mysqlConfiguration = new Gson().fromJson(datasourceRequest.getDatasource().getConfiguration(), MysqlConfiguration.class); MysqlConfiguration mysqlConfiguration = new Gson().fromJson(datasourceRequest.getDatasource().getConfiguration(), MysqlConfiguration.class);
dataSource.setUrl(mysqlConfiguration.getJdbc()); dataSource.setUrl(mysqlConfiguration.getJdbc());
dataSource.setDriverClassName(mysqlConfiguration.getDriver()); dataSource.setDriverClassName("com.mysql.jdbc.Driver");
dataSource.setValidationQuery("select 1"); dataSource.setValidationQuery("select 1");
jdbcConfiguration = mysqlConfiguration; jdbcConfiguration = mysqlConfiguration;
break; break;