{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/5998","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/5998/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/5998/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/5998/events","html_url":"https://github.com/spring-projects/spring-boot/issues/5998","id":155923505,"number":5998,"title":"spring.profiles.active in default properties ignored if defaultProperties contain a value for that key","user":{"login":"deepu105","id":1107223,"avatar_url":"https://avatars.githubusercontent.com/u/1107223?v=3","gravatar_id":"","url":"https://api.github.com/users/deepu105","html_url":"https://github.com/deepu105","followers_url":"https://api.github.com/users/deepu105/followers","following_url":"https://api.github.com/users/deepu105/following{/other_user}","gists_url":"https://api.github.com/users/deepu105/gists{/gist_id}","starred_url":"https://api.github.com/users/deepu105/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepu105/subscriptions","organizations_url":"https://api.github.com/users/deepu105/orgs","repos_url":"https://api.github.com/users/deepu105/repos","events_url":"https://api.github.com/users/deepu105/events{/privacy}","received_events_url":"https://api.github.com/users/deepu105/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"philwebb","id":519772,"avatar_url":"https://avatars.githubusercontent.com/u/519772?v=3","gravatar_id":"","url":"https://api.github.com/users/philwebb","html_url":"https://github.com/philwebb","followers_url":"https://api.github.com/users/philwebb/followers","following_url":"https://api.github.com/users/philwebb/following{/other_user}","gists_url":"https://api.github.com/users/philwebb/gists{/gist_id}","starred_url":"https://api.github.com/users/philwebb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philwebb/subscriptions","organizations_url":"https://api.github.com/users/philwebb/orgs","repos_url":"https://api.github.com/users/philwebb/repos","events_url":"https://api.github.com/users/philwebb/events{/privacy}","received_events_url":"https://api.github.com/users/philwebb/received_events","type":"User","site_admin":false},"assignees":[{"login":"philwebb","id":519772,"avatar_url":"https://avatars.githubusercontent.com/u/519772?v=3","gravatar_id":"","url":"https://api.github.com/users/philwebb","html_url":"https://github.com/philwebb","followers_url":"https://api.github.com/users/philwebb/followers","following_url":"https://api.github.com/users/philwebb/following{/other_user}","gists_url":"https://api.github.com/users/philwebb/gists{/gist_id}","starred_url":"https://api.github.com/users/philwebb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philwebb/subscriptions","organizations_url":"https://api.github.com/users/philwebb/orgs","repos_url":"https://api.github.com/users/philwebb/repos","events_url":"https://api.github.com/users/philwebb/events{/privacy}","received_events_url":"https://api.github.com/users/philwebb/received_events","type":"User","site_admin":false}],"milestone":null,"comments":18,"created_at":"2016-05-20T09:34:29Z","updated_at":"2016-07-04T14:14:40Z","closed_at":null,"body":"As per documentation [here](http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-profile-specific-properties) a boot application is suppose to override properties that is defined in files in the given order.\r\n\r\nSo consider this situation.\r\n\r\nI define `spring.profiles.active` and set it to `dev` using `SpringApplication.setDefaultProperties` which is last in the order. So that my application always has a profile by default.\r\n\r\nNow I set `spring.profiles.active` to `prod`  in my `application.yml` file and since its in a higher order I would expect this to override what I set earlier above.\r\n\r\nBut thats not happening, My application doesnt take prod profile and I see this debug log\r\n```\r\ncom.mycompany.myapp.TestApp              : Starting TestApp on DESKTOP-3NUQHBI with PID 14436 (D:\\Projects\\test\\testApp\\target\\classes started by Deepu in D:\\Projects\\test\\testApp)\r\n2016-05-20 17:07:48.045 DEBUG 14436 --- [  restartedMain] com.mycompany.myapp.TestApp              : Running with Spring Boot v1.3.5.RELEASE, Spring v4.2.6.RELEASE\r\n2016-05-20 17:07:48.046  INFO 14436 --- [  restartedMain] com.mycompany.myapp.TestApp              : The following profiles are active: dev\r\n2016-05-20 17:07:48.046 DEBUG 14436 --- [  restartedMain] o.s.boot.SpringApplication               : Loading source class com.mycompany.myapp.TestApp\r\n2016-05-20 17:07:49.085 DEBUG 14436 --- [  restartedMain] o.s.b.c.c.ConfigFileApplicationListener  : Activated profiles dev\r\n2016-05-20 17:07:49.100 DEBUG 14436 --- [  restartedMain] o.s.b.c.c.ConfigFileApplicationListener  : Profiles already activated, '[prod]' will not be applied\r\n2016-05-20 17:07:49.100 DEBUG 14436 --- [  restartedMain] o.s.b.c.c.ConfigFileApplicationListener  : Loaded config file 'classpath:/config/application.yml'\r\n2016-05-20 17:07:49.100 DEBUG 14436 --- [  restartedMain] o.s.b.c.c.ConfigFileApplicationListener  : Loaded config file 'classpath:/config/application-dev.yml'\r\n2016-05-20 17:07:49.151 DEBUG 14436 --- [  restartedMain] o.s.b.c.c.ConfigFileApplicationListener  : Skipped (empty) config file 'classpath:/config/application-dev.yml' for profile dev\r\n2016-05-20 17:07:49.152 DEBUG 14436 --- [  restartedMain] o.s.b.c.c.ConfigFileApplicationListener  : Skipped (empty) config file 'classpath:/config/application.yml' for profile dev\r\n```\r\n\r\nBut if I set  `spring.profiles.active` to `prod` in Command line arguments its working as expected.\r\n\r\nI would assume that this is a bug as the behaviour is different from what is documented."},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/230300118","html_url":"https://github.com/spring-projects/spring-boot/issues/5998#issuecomment-230300118","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/5998","id":230300118,"user":{"login":"snicoll","id":490484,"avatar_url":"https://avatars.githubusercontent.com/u/490484?v=3","gravatar_id":"","url":"https://api.github.com/users/snicoll","html_url":"https://github.com/snicoll","followers_url":"https://api.github.com/users/snicoll/followers","following_url":"https://api.github.com/users/snicoll/following{/other_user}","gists_url":"https://api.github.com/users/snicoll/gists{/gist_id}","starred_url":"https://api.github.com/users/snicoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snicoll/subscriptions","organizations_url":"https://api.github.com/users/snicoll/orgs","repos_url":"https://api.github.com/users/snicoll/repos","events_url":"https://api.github.com/users/snicoll/events{/privacy}","received_events_url":"https://api.github.com/users/snicoll/received_events","type":"User","site_admin":false},"created_at":"2016-07-04T14:14:40Z","updated_at":"2016-07-04T14:14:40Z","body":"I am not asking you to change anything. I am asking you if that statement is true or not to confirm we fully understood the problem."}}
{"actor":{"display_login":"snicoll"}}