title: Spring cloud config match profile
body: <p>I have a hierarchy structure of applications files in my git repository as follows:</p>
  <p>uri: <a href="https://bitbucket.org/repositorios-company/configuration-files" rel="nofollow noreferrer">https://bitbucket.org/repositorios-company/configuration-files</a></p>
  <p>Directory:</p>
  <pre><code>-authorization-service
  ----application.yml
  ----application-development.yml
  ----application-uat.yml
  ----application-production.yml
  -cpo-executor
  ----application.yml
  ----application-development.yml
  ----application-uat.yml
  ----application-production.yml
  </code></pre>
  <p>In config project yml file:</p>
  <pre><code>server:
      port: 8888
  spring:
      application:
          name: config-server
      cloud:
          config:
              server:
                  git:
                      username: ###### 
                      ....
                      uri: https://bitbucket.org/repositorios-company/cup-configuration-files
                      searchPaths: '{application}'
  </code></pre>
  <p><strong>Problems:</strong></p>
  <ol>
  <li>When I try to access the file of development by url http://localhost:8888/authorization-service/development spring load two files and not only one as I expected:</li>
  </ol>
  <pre><code>2021-01-13 10:34:40.549  INFO 141562 --- [nio-8888-exec-1] o.s.c.c.s.e.NativeEnvironmentRepository  : Adding property source: file:/tmp/config-repo-3531515016986363333/authorization-service/application.yml
  2021-01-13 10:34:48.950  INFO 141562 --- [nio-8888-exec-2] o.s.c.c.s.e.NativeEnvironmentRepository  : Adding property source: file:/tmp/config-repo-3531515016986363333/authorization-service/application-development.yml
  
  </code></pre>
  <ol start="2">
  <li>When a client application, using the following configuration, tries to access the corresponding config file, spring only brings the application.yml file and not the file corresponding to the profile:</li>
  </ol>
  <p>Client yml:</p>
  <pre><code>spring.application.name=authorization-service
  spring.profiles.active=development
  spring.cloud.config.uri=http://localhost:8888
  </code></pre>
  <p>After application starts, spring cloud config log shows the default application.yml:</p>
  <pre><code>2021-01-13 11:09:11.346  INFO 144899 --- [nio-8888-exec-2] o.s.c.c.s.e.NativeEnvironmentRepository  : Adding property source: file:/tmp/config-repo-1131390371944673193/authorization-service/application.yml
  </code></pre>
  <p><strong>Edited: I've checked if the value changed in runtime and if it has taken the values from application-development.yml, but not.</strong></p>
  <p>Does anybody know how can I bring only one config file to the two situations?</p>