I have a spring boot application that is connecting to a MySQL db (MySQL 8.0). Here is the connection configuration in my application.yml file
datasource:
url: "jdbc:mysql://${DB_HOST}:${DB_PORT}/${DB_NAME}?useUnicode=yes&characterEncoding=UTF-8&autoReconnect=true&useSSL=false"
username: "${DB_USER}"
password: "${DB_PASSWORD}"
hikari:
maximumPoolSize: ${DB_MAX_POOL_SIZE}
I would like to enable compression on this connection pool. How can I achieve that? Not been able to find any documentation on this.
CodePudding user response:
The connection parameter is useCompression
. It is a boolean.
Refer to MySQL Connector/J Networking Configuration Properties: useCompression