Skip to content

Commit

Permalink
fix: use PostgreSQLAdapter in autoConfigJdbcAdapter when using (#46)
Browse files Browse the repository at this point in the history
PostgreSQL database

issue: #44

Signed-off-by: tsund <[email protected]>
  • Loading branch information
shink authored May 29, 2021
1 parent 3e9f859 commit 5220c75
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.casbin.adapter.DB2Adapter;
import org.casbin.adapter.JdbcAdapter;
import org.casbin.adapter.OracleAdapter;
import org.casbin.adapter.PostgreSQLAdapter;
import org.casbin.annotation.CasbinDataSource;
import org.casbin.exception.CasbinAdapterException;
import org.casbin.exception.CasbinModelConfigNotFoundException;
Expand Down Expand Up @@ -92,8 +93,9 @@ public Adapter autoConfigJdbcAdapter(
switch (databaseName) {
case "mysql":
case "h2":
case "postgresql":
return new JdbcAdapter(jdbcTemplateToUse, exceptionProperties, autoCreateTable);
case "postgresql":
return new PostgreSQLAdapter(jdbcTemplateToUse, exceptionProperties, autoCreateTable);
case "oracle":
return new OracleAdapter(jdbcTemplateToUse, exceptionProperties, autoCreateTable);
case "db2":
Expand Down

0 comments on commit 5220c75

Please sign in to comment.