Medium java spring

16. What happens if application.yml and application.properties both exist?

Sample answer: "Both are loaded and merged. If the same key is in both at the same location, .properties wins. The docs recommend one format per app."

It is not "one or the other". The docs: "If you have configuration files with both .properties and YAML format in the same location, .properties takes precedence."

Sources (1)
  1. Externalized configuration