YAML is a readable format for hierarchical configuration. In Spring Boot, application.yml can express the same settings as application.properties while making nested structure easier to scan. section 3.1.2
Configure an embedded database
Rename application.properties to application.yml and configure the H2 database with nested keys. Disabling generated names and setting the name to tacocloud produces the JDBC URL jdbc:h2:mem:tacocloud. section 3.1.2
spring:
datasource:
generate-unique-name: false
name: tacocloud
This listing shows how YAML indentation groups datasource settings beneath the spring configuration key. section 3.1.2
The configuration choice has two practical implications:
- Spring Boot accepts either properties-file format or YAML format. section 3.1.2
- YAML is used for subsequent configuration because its structure improves readability. section 3.1.2















