Bird
0
0

Which configuration source is read first by Spring Boot when starting an application?

easy📝 Conceptual Q2 of 15
Spring Boot - Application Configuration
Which configuration source is read first by Spring Boot when starting an application?
ADefault properties set programmatically
BEnvironment variables
CCommand line arguments
Dapplication.properties in classpath
Step-by-Step Solution
Solution:
  1. Step 1: Identify the earliest configuration source

    Default properties set programmatically are the base and loaded first before any external sources.
  2. Step 2: Understand loading order

    Spring Boot loads default properties first, then overrides them with external sources like files or environment variables.
  3. Final Answer:

    Default properties set programmatically -> Option A
  4. Quick Check:

    First loaded = Default properties [OK]
Quick Trick: Defaults load before external configs [OK]
Common Mistakes:
  • Assuming application.properties loads first
  • Confusing environment variables with defaults

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes