0
0
Spring Bootframework~5 mins

application.yml alternative in Spring Boot - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the main alternative to using application.yml in Spring Boot for configuration?
The main alternative is application.properties, which uses key-value pairs instead of YAML format.
Click to reveal answer
beginner
How does application.properties format differ from application.yml?
application.properties uses simple key=value lines, while application.yml uses indentation and nested structures for grouping settings.
Click to reveal answer
intermediate
Can you use both application.yml and application.properties in the same Spring Boot project?
Yes, Spring Boot supports both files. Properties in application.properties override those in application.yml if keys overlap.
Click to reveal answer
beginner
What is a benefit of using application.properties over application.yml?
application.properties is simpler and more familiar to many developers, especially for small or flat configurations.
Click to reveal answer
intermediate
Name another alternative to application.yml for externalizing configuration in Spring Boot.
You can use environment variables or command-line arguments to override configuration values without changing files.
Click to reveal answer
Which file format is an alternative to application.yml in Spring Boot?
Aapplication.properties
Bconfig.xml
Csettings.json
Dconfig.ini
In Spring Boot, if the same property is defined in both application.yml and application.properties, which one takes precedence?
Aapplication.yml
BBoth are merged equally
Capplication.properties
DDepends on the order of files
What is a key visual difference between application.yml and application.properties?
AYAML uses indentation; properties use key=value lines
BYAML uses XML tags; properties use JSON format
CYAML is binary; properties is text
DYAML is only for Java; properties is for all languages
Which of these is NOT a way to override Spring Boot configuration besides application.yml?
ACommand-line arguments
BJava source code annotations
CEnvironment variables
Dapplication.properties file
Why might a developer choose application.properties over application.yml?
ASupports nested structures better
BProperties files are faster to load
CYAML is deprecated in Spring Boot
DSimpler syntax for flat configurations
Explain the differences and use cases between application.yml and application.properties in Spring Boot.
Think about file format and how Spring Boot prioritizes them.
You got /4 concepts.
    List other ways to provide configuration to a Spring Boot application besides application.yml and application.properties.
    Consider runtime and external sources.
    You got /4 concepts.