From the spring documentation http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-yaml i see that an external YAML file is possible.
I was able to use a PropertyPlaceholderConfig FileSystem resourse to load in yaml, but it did not honor the active profile.
I saw for application.properties you can use @PropertySource, but that does not work for YAML according to the docs.
So bottom line question: How do a specify an application.yml in a profile aware fashion in Spring4/spring boot.
Note: It works in src/main/resources/application.yml
application-[profile].ymlnext to theapplication.yml. As explained at the same link you refer to. Spring Boot will automatically load it. - M. Deinum--spring.config.locationwhich is explained a little further down that section (docs.spring.io/spring-boot/docs/current/reference/html/…). - M. Deinum