title: IntelliJ IDEA not picking up correct application-{}.properties file
body: <p>I have a spring boot 1.5.1 project that uses profile properties file.  In my /src/main/resources I have all my properties files
  <a href="https://i.stack.imgur.com/2wCY8.png" rel="noreferrer"><img src="https://i.stack.imgur.com/2wCY8.png" alt="enter image description here"></a></p>
  
  <p>When using IntelliJ 2016.3.4 I set the </p>
  
  <blockquote>
    <p>Run Configuration | Active Profile</p>
  </blockquote>
  
  <p>to "local" and run it.  I see this in the console: </p>
  
  <blockquote>
    <p>The following profiles are active: local</p>
  </blockquote>
  
  <p>But there is a value in the property file 
   <code>data.count.users=2</code></p>
  
  <p>and used as:</p>
  
  <pre><code>@Value("${data.count.users}")
  private int userCount;
  </code></pre>
  
  <p>that is not being picked up and thus causing the error:</p>
  
  <blockquote>
    <p>Caused by: java.lang.IllegalArgumentException: Could not resolve
    placeholder 'data.count.users' in string value "${data.count.users}"</p>
  </blockquote>
  
  <p>However, if I run this via gradle</p>
  
  <pre><code>bootRun {
    systemProperty 'spring.profiles.active', System.properties['spring.profiles.active'] }
  </code></pre>
  
  <p>as </p>
  
  <blockquote>
    <p>gradle bootRun -Dspring.profiles.active=local</p>
  </blockquote>
  
  <p>then everything starts up using the local profile as expected.  Can anyone see why this is not being properly picked up?  In IntelliJ Project Structure I have my /src/main/resources defined as my Resource Folders.</p>
  
  <p>UPDATE:</p>
  
  <p>Adding screenshot of Configuration:
  <a href="https://i.stack.imgur.com/LLFmL.png" rel="noreferrer"><img src="https://i.stack.imgur.com/LLFmL.png" alt="enter image description here"></a></p>