Search code examples
spring-boothikaricpamazon-aurora

Spring Boot Using Hikari Connection Pool


I took over from a SpringBoot 2.0.1.RELEASE app. when I start the app. I see these message in the console:

2018-04-25 05:52  [restartedMain] INFO  com.zaxxer.hikari.HikariDataSource.getConnection(110) - HikariPool-1 - Starting...
2018-04-25 05:52  [restartedMain] INFO  com.zaxxer.hikari.HikariDataSource.getConnection(123) - HikariPool-1 - Start completed.

despit this, I don't see any import or reference to hikari in the whole project (?!?!)

 <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

<dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>

and in the application.properties:

spring.datasource.url=jdbc:mysql://elcordelaciutat.awob1oxhu1so.eu-central-1.rds.amazonaws.com:3306/elcor
spring.datasource.username=elcor
spring.datasource.password=elcor2#$

spring.jpa.show-sql=false
spring.jpa.properties.hibernate.format_sql=true
hibernate.dialect=org.hibernate.dialect.MySQLDialect

Is it really possible ????


Solution

  • Since the SpringBoot 2.0.0, the default connection pool for Spring is HikariCP instead of Tomcat.

    You can checkout more in the release notes:

    https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Release-Notes#hikaricp