Does spring boot support using both properties and yml files at the same time?

Yes You can use both at same time in same project.

  • When you use both YML and properties at same time, say for example
    application.yml and application.properties at same time in same
    project, first application.yml will be loaded later
    application.properties will be loaded
    .
  • Important point to be noted is that if application.yml and application.properties have same keys for example in application.yml has spring.app.name = testYML and application.properties has spring.app.name = testProperties at same time in same project, then application.yml value will be overwritten by application.properties value since it is loading at last.
  • And the value in spring.app.name = testProperties.

I can answer my own question, as it just works as you would expect. The application.yml file and the appropriate application-${profile}.properties both get loaded and merged into the environment. Spring boot just makes this work naturally.