Spring Boot Profiles
Question Variations
- "How do Spring profiles change bean creation?"
- "What wins when a property is defined in several sources?"
- "Why should production secrets not live in profile YAML files?"
Why This Is Asked
Profiles test whether candidates can vary environment-specific wiring safely without scattering environment checks through application code.
Key Concepts
- Profiles activate configuration and beans for a deployment environment.
- Property source precedence determines the final effective value.
- Production secrets belong in secure external configuration.
- Tests should declare their configuration explicitly.
Question Variations
- “How do Spring profiles change bean creation?”
- “What wins when a property is defined in several sources?”
- “Why should production secrets not live in profile YAML files?”