Reputation: 728
How do I configure the property value that tcpkeepalive value is set to true?
I already tried
spring:
datasource:
connection-properties: tcpKeepAlive=true
connectionproperties: tcpKeepAlive=true
However, without success.
HikariConfig does contain a Properties object, but how has the values be defined in the yml file that they are loaded there?
Upvotes: 2
Views: 2174
Reputation: 109079
Assuming this property is a connection property of the driver, you need to configure the dataSourceProperties
property on hikari
. You can do this like:
spring:
datasource:
hikari:
data-source-properties:
tcpKeepAlive: true
Alternatively, you could include the properties in the spring.datasource.url
property.
Upvotes: 4