Externalized and Override Configuration
Override config via environment and command line.
The 12-Factor Idea
A core principle of portable apps is storing configuration in the environment, not in code. The same artifact should run anywhere, with behavior changed only by external config.
Spring Boot embraces this: a single jar reads from many sources and merges them with a well-defined precedence.
Many Sources, One Environment
Boot collects configuration from numerous property sources — files, environment variables, command-line args, and more — into one unified Environment.
- Each source contributes key/value pairs
- Higher-priority sources win on conflicts
- Your code never knows or cares where a value came from
All lessons in this course
- application.properties and YAML
- Profiles for Environments
- Type-Safe Configuration with @ConfigurationProperties
- Externalized and Override Configuration