title: Spring Cloud Config Client app not using bootstrap.properties
body: <p>I am working through a few tutorials for spring cloud and have hit a problem with my config client app. I have a Eureka server running on a Linux machine and on my Mac I have a config server which is registering correctly with the Eureka server. I generated a config client app using the spring initialiser. The dependencies I have are:</p>
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-starter-config&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &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.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-starter-netflix-eureka-client&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  <p>I have a bootstrap.properties file like this:</p>
  <pre><code>spring.application.name=config-client-app
  spring.cloud.config.discovery.enabled=true
  eureka.client.serviceUrl.defaultZone=http://192.168.1.125:8761/eureka/
  </code></pre>
  <p>When the config client app starts it fails to register with the Eureka server, as it is looking for an instance running on the local machine. If I put this in the application.properties then it does register with eureka but with the name UNKNOWN.</p>
  <pre><code>eureka.client.serviceUrl.defaultZone=http://192.168.1.125:8761/eureka/
  </code></pre>
  <p>From this it seems that the config client app is not using the bootstrap.properties file. From what I have read by having spring-cloud-starter-config on the classpath it should look for a bootstrap.properties file at startup.</p>
  <p>The main application class has the following annotations.</p>
  <pre><code>@SpringBootApplication
  @EnableDiscoveryClient
  @RestController
  </code></pre>
  <p>What I am trying to achieve here is for the client to ask eureka for the location of the config server and then get it's config from there.</p>
  <p>Thanks
  Andrew</p>