Search code examples
spring-boothikaricp

what is difference (spring.datasource.hikari.jdbc-url's parameter connection time out VS spring.datasource.hikari.connectiontimeout)?


what is difference (spring.datasource.hikari.jdbc-url's parameter connection time out VS spring.datasource.hikari.connectiontimeout) ?


Solution

  • The Hikari docs suggest that you can use either one, but recommends that you set the parameter on the datasource directly.

    jdbcUrl - This property directs HikariCP to use "DriverManager-based" configuration. We feel that DataSource-based configuration (above) is superior for a variety of reasons (see below), but for many deployments there is little significant difference. When using this property with "old" drivers, you may also need to set the driverClassName property, but try it first without. Note that if this property is used, you may still use DataSource properties to configure your driver and is in fact recommended over driver parameters specified in the URL itself. Default: none