Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource Spring Boot Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource Spring Boot spring spring

Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource Spring Boot


Same problem with me (Spring boot 2),

I Fixed add driver-class.

Look up application.properties file.

spring.datasource.driver-class-name=com.mysql.jdbc.Driver

Full code.

spring.datasource.driver-class-name=com.mysql.jdbc.Driverspring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialectspring.jpa.show-sql=truespring.jpa.hibernate.ddl-auto=upatespring.datasource.url=jdbc:mysql://localhost:3306/database_namespring.datasource.username=adminspring.datasource.password=admin1234


As Stephane Nicoll said, you don't have driver on your classpath. You need to include jdbc driver on your gradle build as below. However, you don't have to stick to driver version that I have included.

dependencies {    compile "org.springframework.boot:spring-boot-starter-web"    compile "org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1"    testCompile "org.springframework.boot:spring-boot-starter-test"    runtime('com.oracle:ojdbc7:12.1.0.2.0') }


I have added the below in properties file

spring.datasource.driverclassname = com.mysql.jdbc.Driverhibernate.dialect=org.hibernate.dialect.MySQL5Dialect

and added the below in POM file

        <groupId>mysql</groupId>        <artifactId>mysql-connector-java</artifactId>

It is working fine now.