HikariCP Github page具有以下代码:
props.put("dataSource.logWriter", new PrintWriter(System.out));
但是由于不支持LogWriter,所以出现NullPointerException,
DriverDataSource最后的HikariCP类:
@Override
public PrintWriter getLogWriter() throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
@Override
public void setLogWriter(PrintWriter logWriter) throws SQLException
{
throw new SQLFeatureNotSupportedException();
}
此更新HikariCP日志记录的解决方案不相关吗?
在group中我没有得到任何答案
编辑
Hikari初始化代码使用PoolBase,它使用DriverDataSource
(不支持logWriter)初始化数据源:
else if (jdbcUrl != null && ds == null) {
ds = new DriverDataSource(jdbcUrl, driverClassName, dataSourceProperties, username, password);
我必须在Oracle中发送jdbcUrl
,并且setDataSourceClassName
与setDriverClassName
一起失败