Database connection pool[Hikari] initialize error

后端 未结 2 1207
温柔的废话
温柔的废话 2021-01-13 17:51

I am trying to configure HikariCP for my web application. I am not using any frameworks, it is a plain simple java web app. When I tried to establish a connection through no

2条回答
  •  终归单人心
    2021-01-13 18:25

    Actually I got the answer, Hikari needs to set a connection test query, if thats done JDBC4 isValid will not get called.

    so just by adding property, I was able to make it work.

    mConfig.setConnectionTestQuery("show tables");
    

提交回复
热议问题