Krish
Krish

Reputation: 2002

How to customize the spring boot default properties of connection pool

I am using Spring boot + MySQL + Data JPA. When I started my spring boot app, its taking initial pool size as 10.

I have tried to customize it using following property:

spring.datasource.dbcp2.initial-size=20

But its not working. How to fix this ?

Upvotes: 0

Views: 1522

Answers (1)

rieckpil
rieckpil

Reputation: 12051

If you don't configure your Connection Pool, Spring Boot will pick HikariCP at default. The connection pool for HikariCP can be configured as following:

spring.datasource.hikari.maximum-pool-size=5

Upvotes: 1

Related Questions