Method org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int) is not yet implemented错误解决

17:25:17:166 [Druid-ConnectionPool-Create-1566729816] ERROR log=c.a.d.p.DruidDataSource,traceId=,userId=,msg=create connection SQLException, url: jdbc:postgresql://...:5432/..., errorCode 0, state 0A000,org.postgresql.util.PSQLException: Method org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int) is not yet implemented.
at org.postgresql.Driver.notImplemented(Driver.java:753)
at org.postgresql.jdbc2.AbstractJdbc2Statement.setQueryTimeout(AbstractJdbc2Statement.java:656)
at com.alibaba.druid.pool.vendor.PGValidConnectionChecker.isValidConnection(PGValidConnectionChecker.java:64)
at com.alibaba.druid.pool.DruidAbstractDataSource.validateConnection(DruidAbstractDataSource.java:1346)
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1633)
at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2468)

由于postgresql版本问题导致的,将postgresql的版本改成如下:

 
      org.postgresql
      postgresql
      42.0.0
    

再次执行之后,一切OK!

你可能感兴趣的:(Method org.postgresql.jdbc4.Jdbc4Statement.setQueryTimeout(int) is not yet implemented错误解决)