title: Unable to configure Spring Cloud Consul for specific profiles
body: <p>I'm trying to configure spring cloud consul for a specific profile but when I try to run the application I get the following error:</p>
  <pre><code>***************************
  APPLICATION FAILED TO START
  ***************************
  
  Description:
  
  Config data location 'consul:' does not exist
  
  Action:
  
  Check that the value 'consul:' at class path resource [application-local.properties] - 6:22 is correct, or prefix it with 'optional:'
  
  
  Process finished with exit code 1
  </code></pre>
  <p>If I update <code>spring.config.import</code> to <code>spring.config.import=optional:consul:</code> in <code>application-local.properties</code>, consul configuration is ignored and the configuration from the properties file is used instead of consul.</p>
  <p><code>application.properties</code>:</p>
  <pre><code>spring.cloud.consul.enabled=false
  </code></pre>
  <p><code>application-local.properties</code>:</p>
  <pre><code>spring.cloud.consul.enabled=true
  spring.config.import=consul:
  
  spring.cloud.consul.config.enabled=true
  spring.cloud.consul.config.watch.enabled=true
  spring.cloud.consul.config.watch.delay=6000
  spring.cloud.consul.config.watch.wait-time=1
  spring.cloud.consul.config.profile-separator=_
  
  </code></pre>
  <p>It seems that Spring is not overriding the default configuration with the one specified in <code>application-local.properties</code>.  I also tried configuring consul in <code>bootstrap.properties</code> and <code>bootstrap-local.properties</code> but I got the following error:</p>
  <pre><code>***************************
  APPLICATION FAILED TO START
  ***************************
  
  Description:
  
  No spring.config.import property has been defined
  
  Action:
  
  Add a spring.config.import=consul: property to your configuration.
      If configuration is not required add spring.config.import=optional:consul: instead.
      To disable this check, set spring.cloud.consul.config.enabled=false or 
      spring.cloud.consul.config.import-check.enabled=false.
  
  
  </code></pre>
  <p>I'm using <code>org.springframework.cloud:spring-cloud-starter-consul-config:3.0.3</code> and spring boot 2.4.7</p>
  <p>Thank you in advance.</p>