2V0-72.22PSE · Question #41
Spring Boot will find and load property files in which of the following? (Choose the best answer.)
The correct answer is C. application.properties or application.yml, usually located in the classpath root. Spring Boot automatically discovers and loads application.properties or application.yml from the classpath root (typically src/main/resources/) by convention, requiring zero additional configuration - this is a core part of Spring Boot's "opinionated defaults" philosophy. Why…
Question
Spring Boot will find and load property files in which of the following? (Choose the best answer.)
Options
- AA *.properties file matching the name of the class annotated with @SpringBootApplication.
- Bconfig.properties or config.yml, usually located in the classpath root.
- Capplication.properties or application.yml, usually located in the classpath root.
- Denv.properties or env.yml, usually located in the classpath root.
How the community answered
(69 responses)- A4% (3)
- B9% (6)
- C86% (59)
- D1% (1)
Explanation
Spring Boot automatically discovers and loads application.properties or application.yml from the classpath root (typically src/main/resources/) by convention, requiring zero additional configuration - this is a core part of Spring Boot's "opinionated defaults" philosophy.
Why the distractors are wrong:
- A is wrong because Spring Boot does not look for a properties file named after your
@SpringBootApplicationclass - that annotation bootstraps the application context, not property loading. - B is wrong because
config.properties/config.ymlare not Spring Boot conventions; while aconfig/subdirectory is a valid search location, the file must still be namedapplication.*. - D is wrong because
env.properties/env.ymlhave no special meaning in Spring Boot - environment-specific overrides use profiles likeapplication-dev.properties, not a separate filename.
Memory tip: Think "A"pplication → "A"pplication.properties - the file name mirrors the word "application," just like @SpringBootApplication marks the main application class. Both share the same root concept: the application itself.
Topics
Community Discussion
No community discussion yet for this question.