Skip to content

Commit

Permalink
fix: update the way to get the driver (#69)
Browse files Browse the repository at this point in the history
Because if the user does not configure the driver class name, a null pointer will be thrown

Co-authored-by: [email protected] <gmf1988mingfeng>
  • Loading branch information
xgaxpp committed Sep 7, 2022
1 parent b90f961 commit 6b4eef9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public Adapter autoConfigJdbcAdapter(
boolean autoCreateTable = initializeSchema == CasbinDataSourceInitializationMode.CREATE;
String tableName = properties.getTableName();
logger.info("Casbin current use database product: {}", databaseName);
return new JDBCAdapter(dataSourceProperties.getDriverClassName(), dataSourceProperties.getUrl(),
return new JDBCAdapter(dataSourceProperties.determineDriverClassName(), dataSourceProperties.getUrl(),
dataSourceProperties.getUsername(), dataSourceProperties.getPassword(),
exceptionProperties.isRemovePolicyFailed(), tableName, autoCreateTable);

Expand Down

0 comments on commit 6b4eef9

Please sign in to comment.