title: Spring boot not reading environment specific YAML file
body: <p>I have developed a spring boot rest application and I am trying to read the environment specific YAML file based on the value "<strong>spring.profiles.active</strong>"</p>
  
  <p>I have two files </p>
  
  <pre><code> 1. application.yml
   2. application-qa.yml
  </code></pre>
  
  <p>and I have below property in both the files </p>
  
  <p><em>application.yml</em> file has below property</p>
  
  <pre><code>comp:
   bu:
    env: local
  </code></pre>
  
  <p><em>application-qa.yml</em> file has below property</p>
  
  <pre><code>comp:
   bu:
    env: QA
  </code></pre>
  
  <p>and I am setting  <code>spring.profiles.active=qa</code>, given above, I was expecting that only  <code>application-qa.yml</code> gets loaded, but in this case both <code>application.yml and application-qa.yml</code> are getting loaded and when my code looks for property <strong>comp.bu.env</strong> it is always getting the value </p>
  
  <blockquote>
    <p>local</p>
  </blockquote>
  
  <p>only </p>
  
  <p>I want my code to read the <strong>comp.bu.env</strong> property from <code>application-qa.yml</code> file. </p>
  
  <p>can some help to figure out what i am missing here?</p>