title: Spring Boot auto reconfiguration not working on spring-boot-data-starter-jdbc
body: <p>I am trying to deploy a spring boot application to CF connecting a Postgres backing service . I can see the db properties are not being replaced in run time with VCAP env.
  I am using the dependency - spring-boot-starter-jdbc ( not spring-boot-starter-data-jpa as i intend to use JDBC template and not JPA).</p>
  
  <p>Steps</p>
  
  <p>Added the following jars in pom.xml ( spring-boot-starter-data-jpa , postgresql- driver)</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;com.h2database&lt;/groupId&gt;
          &lt;artifactId&gt;h2&lt;/artifactId&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.postgresql&lt;/groupId&gt;
          &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
  </code></pre>
  
  <p>Create a bean returning the type DataSource</p>
  
  <pre><code>@Bean
  @ConfigurationProperties(prefix="spring.datasource")
  public DataSource dataSource() {
      @SuppressWarnings("rawtypes")
      DataSourceBuilder builder = DataSourceBuilder.create();
      return builder.build();
  }
  </code></pre>
  
  <p>Specify connection properties in application.properties.</p>
  
  <pre><code>spring.datasource.jdbcUrl=jdbc:postgresql://localhost:5432/test
  spring.datasource.username= dummy
  spring.datasource.password=dummy
  spring.datasource.platform=postgresql
  </code></pre>
  
  <p>With this the local setup works fine . When the application is deployed to Cloud foundry the expectation is spring auto reconfiguration should replace the bean with properties in vcap .<br>
  However the values dont seem to be replaced and system tries to connect to localhost on CF which fails.</p>
  
  <p>I have reviewed all the documents and they seem to work with spring-boot-starter-data-jpa but not with jdbc. I can see the auto reconfig not working in case of JDBC scenario.</p>
  
  <p>Any help is appreciated.</p>
  
  <p>Thanks and Regards,
  Veera</p>