Spring Boot Configuration Properties
Question Variations
- "Why prefer `@ConfigurationProperties` over scattered `@Value` fields?"
- "How do you validate startup configuration?"
- "How should production secrets be supplied?"
Why This Is Asked
Externalized configuration tests whether candidates can keep environment-specific values out of code while retaining a validated, discoverable contract.
Key Concepts
@ConfigurationPropertiesbinds a namespaced configuration object.- Validation catches invalid startup configuration.
- Profiles and environment variables select deployment values.
- Secrets should come from secure external configuration, not source control.
Question Variations
- “Why prefer
@ConfigurationPropertiesover scattered@Valuefields?” - “How do you validate startup configuration?”
- “How should production secrets be supplied?”