Interview questions
Question 70 of 254
FreeWhat is the difference between application.properties and application.yml?
Spring Boot Configuration & Properties
Both configure the same underlying properties and are functionally equivalent — application.properties uses flat dot-separated keys (`spring.datasource.url=...`), while application.yml uses YAML's nested indentation to express the same hierarchy more concisely and supports native lists without repeating the key. Only one is needed; if both exist, .properties takes precedence over .yml for duplicate keys within the same profile document.
Beginner3 min

