【发布时间】:2017-03-09 20:01:44
【问题描述】:
我正在尝试使用此属性,但它给了我异常,我什至尝试使用:pgjdbc-ng | com.impossibl.postgres.jdbc.PGDataSource 但没有成功,它给了我同样的标题例外。
ERROR com.zaxxer.hikari.util.PropertyElf - Property leakDetectionThreshold does not exist on target class org.postgresql.ds.PGSimpleDataSource
java.lang.RuntimeException: Property leakDetectionThreshold does not exist on target class org.postgresql.ds.PGSimpleDataSource
HirakriCP 配置:
ds = new HikariDataSource();
ds.setMaximumPoolSize(poolSize);
ds.setDataSourceClassName("org.postgresql.ds.PGSimpleDataSource");
ds.addDataSourceProperty("serverName", serverAddress);
ds.addDataSourceProperty("databaseName", database);
ds.addDataSourceProperty("user", user);
ds.addDataSourceProperty("portNumber", port);
ds.addDataSourceProperty("password", password);
ds.addDataSourceProperty("leakDetectionThreshold ", 5000);
或者:
ds.setDataSourceClassName("com.impossibl.postgres.jdbc.PGDataSource");
ds.addDataSourceProperty("host", serverAddress);
ds.addDataSourceProperty("database", database);
ds.addDataSourceProperty("user", user);
ds.addDataSourceProperty("port", port);
ds.addDataSourceProperty("password", password);
我可能做错了什么吗?我很害怕我在互联网上找不到有同样问题的人oO
比你提前, 亚历山大
【问题讨论】:
标签: postgresql hikaricp