title: Spring boot not loading specific profile
body: <p>I am unable to load specific Spring boot profile from command line.</p>
  
  <p>applciation.yml file content is as follows and it is placed inside resource folder of my application.</p>
  
  <pre><code>server:
      port: 8787
  spring:
    application:
      name: demo
  
  spring:
    profiles: local_mysql
    datasource:
      url: jdbc:mysql://localhost:3306/demo?createDatabaseIfNotExist=true
      username: root
      password: root
      driverClassName: com.mysql.jdbc.Driver
    jpa:
      hibernate:
        ddl-auto: update
        dialect: org.hibernate.dialect.MySQLDialect
  server:
      port: 8787
  
  spring:
    profiles: development
    datasource:
      url: jdbc:mysql://localhost:3306/demo?createDatabaseIfNotExist=true
      username: admin
      password: admin
      driverClassName: com.mysql.jdbc.Driver
    jpa:
      hibernate:
        ddl-auto: update
        dialect: org.hibernate.dialect.MySQLDialect
  server:
      port: 8788
  </code></pre>
  
  <p>After executing <code>mvn clean package</code>
  and running application with
  <code>java -jar -Dspring.profiles.active=local_mysql target\demo-1.0.0-SNAPSHOT.jar</code></p>
  
  <p>Application ignores specified profile and just starts on 8080 with H2 Db instead mySQL.</p>