Reputation: 71
We have added dependency in maven pom.xml
for HikariCP with our Spring Boot application, but I am not sure about the benefit for this. We are using JdbcTemplate
for the DB access.
Can anyone please share the benefit of HikariCP?
Upvotes: 4
Views: 3651
Reputation: 44980
HikariCP is a JDBC connection pooling library while JdbcTemplate is a Spring Framework class used to simplify the SQL operations in your application code. You are comparing apples to oranges.
You most likely need some kind of JDBC pooling library if your application connects to a database, unless you can manage this entirely with the JDBC driver options. The JDBC pooling library is there to provide a number of functionalities:
Starting from Spring Boot 2.0 HikariCP is the default solution, previously it was tomcat-jdbc. More on this change in the official Spring Boot 2.0 migration guide.
Upvotes: 7