fix: properties not work when use custom driver

This commit is contained in:
vran 2022-05-07 09:57:50 +08:00
parent 3450947b0f
commit 799bb67a1a
1 changed files with 3 additions and 0 deletions

View File

@ -79,6 +79,9 @@ public class CustomDatabaseConnectionFactory implements DatabaseConnectionFactor
Properties info = new Properties();
info.put("user", context.getUsername());
info.put("password", context.getPassword());
if (context.getProperties() != null && !context.getProperties().isEmpty()) {
info.putAll(context.getProperties());
}
return driver.connect(jdbcUrl, info);
}