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?✗ Incorrect
application.properties is the standard alternative to application.yml in Spring Boot.In Spring Boot, if the same property is defined in both
application.yml and application.properties, which one takes precedence?✗ Incorrect
Properties in
application.properties override those in application.yml if keys overlap.What is a key visual difference between
application.yml and application.properties?✗ Incorrect
application.yml uses indentation for structure; application.properties uses simple key=value pairs.Which of these is NOT a way to override Spring Boot configuration besides
application.yml?✗ Incorrect
Java annotations configure beans but do not override external configuration like environment variables or properties files.
Why might a developer choose
application.properties over application.yml?✗ Incorrect
application.properties is simpler and easier for flat key-value pairs, making it a good choice for simple configs.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.