The bean 'dataSource', defined in BeanDefinition defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$H

Spring Cloud Finchley release train is not compatible to Spring Boot 2.1.x out of the box. You need to upgrade from Finchley.SR2 to Greenwich.RELEASE.

See the section “Release Trains” on the Spring Cloud homepage:

Spring Cloud compatibility matrix


In application.properties

spring.main.allow-bean-definition-overriding=true

Please see and add the last 2 lines inside your application.yml:

spring:
  datasource:
#    type: com.zaxxer.hikari.HikariDataSource
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://localhost:3306/test
    username: root
    password: root

  jpa:
    hibernate:
      ddl-auto: update
    show-sql: true
  main:
    allow-bean-definition-overriding: true