This commit is contained in:
parent
4d525536f6
commit
a668c46e89
|
|
@ -98,12 +98,11 @@ public class JdbcDataSourceProvider {
|
|||
logger.warn("Jdbc driver loading error. Driver {} cannot accept url.", drv);
|
||||
throw new RuntimeException("Jdbc driver loading error.");
|
||||
}
|
||||
if (dbType.equals(DbType.MYSQL)) {
|
||||
if (driver.getMajorVersion() >= 8) {
|
||||
properties.setDriverClassName(drv);
|
||||
} else {
|
||||
properties.setDriverClassName(Constants.COM_MYSQL_JDBC_DRIVER);
|
||||
}
|
||||
//Compatible historical version data source connection information
|
||||
if (dbType.equals(DbType.MYSQL) && driver.getMajorVersion() <= 8) {
|
||||
properties.setDriverClassName(Constants.COM_MYSQL_JDBC_DRIVER);
|
||||
} else {
|
||||
properties.setDriverClassName(drv);
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
logger.warn("The specified driver not suitable.");
|
||||
|
|
|
|||
Loading…
Reference in New Issue