PostgreSQL
 sql >> Datenbank >  >> RDS >> PostgreSQL

Wie konfiguriere ich HikariCP für postgresql?

Sie haben ein Beispiel auf der HikariCP-Konfigurations-Wiki-Seite

 Properties props = new Properties();

props.setProperty("dataSourceClassName", "org.postgresql.ds.PGSimpleDataSource");
props.setProperty("dataSource.user", "test");
props.setProperty("dataSource.password", "test");
props.setProperty("dataSource.databaseName", "mydb");
props.put("dataSource.logWriter", new PrintWriter(System.out));

HikariConfig config = new HikariConfig(props);
HikariDataSource ds = new HikariDataSource(config);