title: HikariCP with Spring boot autoconfiguration & Spring Data
body: <p>I am trying to use spring boot(1.4.3.RELEASE) autoconfoguration. This is a multi module project.</p>
  
  <pre><code>parent project
  |---pom.xml  -&gt; This is a parent pom.
  |---repository(Spring Data)
      |---pom.xml
      |---src
  |---web
      |---pom.xml
      |---src
  </code></pre>
  
  <p>My application.properties,</p>
  
  <pre><code># Dialer Data Access
  spring.datasource.hikari.connection-test-query=SELECT 1 FROM DUAL
  spring.datasource.hikari.minimum-idle=5
  spring.datasource.hikari.maximum-pool-size=10
  spring.datasource.hikari.pool-name=cc_dialer
  spring.datasource.hikari.driver-class-name=com.mariadb.jdbc.Driver
  spring.datasource.hikari.url=jdbc:mysql://localhost:3306/dialer
  spring.datasource.hikari.username=root
  spring.datasource.hikari.password=root
  spring.datasource.hikari.type com.zaxxer.hikari.HikariDataSource
  </code></pre>
  
  <p>web module Application.java,</p>
  
  <pre><code>@SpringBootApplication(exclude = {  VelocityAutoConfiguration.class }, scanBasePackages = 
              { "com.test.dbrepo.repository" })
  @EnableScheduling
  public class DialerApplication {
  </code></pre>
  
  <p>Web pom.xml,</p>
  
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-security&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-websocket&lt;/artifactId&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>Repository application,</p>
  
  <pre><code>@SpringBootApplication(scanBasePackages = { "com.cc.dialer.dbrepo" })
  public class DialerDBServiceApplication {
  </code></pre>
  
  <p>Repository pom.xml,</p>
  
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-jdbc&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/com.zaxxer/HikariCP --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.zaxxer&lt;/groupId&gt;
              &lt;artifactId&gt;HikariCP&lt;/artifactId&gt;
              &lt;!-- &lt;version&gt;2.5.1&lt;/version&gt;--&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/org.mariadb.jdbc/mariadb-java-client --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mariadb.jdbc&lt;/groupId&gt;
              &lt;artifactId&gt;mariadb-java-client&lt;/artifactId&gt;
              &lt;!-- &lt;version&gt;1.5.7&lt;/version&gt;--&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>I am trying to use Spring boot autoconfiguration, but getting the below error.</p>
  
  <pre><code>2017-01-17 14:57:59.903 [main] WARN  o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Tomcat.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.tomcat.jdbc.pool.DataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (the profiles "dev" are currently active).
  2017-01-17 14:57:59.905 [main] INFO  o.a.catalina.core.StandardService - Stopping service Tomcat
  2017-01-17 14:57:59.911 [main] WARN  o.s.boot.SpringApplication - Error handling failed (Error creating bean with name 'delegatingApplicationListener' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available)
  2017-01-17 14:57:59.914 [main] ERROR o.s.b.d.LoggingFailureAnalysisReporter -
  
  ***************************
  APPLICATION FAILED TO START
  ***************************
  
  Description:
  
  Cannot determine embedded database driver class for database type NONE
  </code></pre>