PostgreSQL
 sql >> Base de données >  >> RDS >> PostgreSQL

Comment configurer HikariCP pour postgresql ?

Vous avez un exemple dans la page wiki de configuration HikariCP

 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);