At a high level, more specific sources override defaults: command-line args and environment variables typically override `application.yml`, and profile-specific config (e.g., `application-prod.yml`) overrides the base file when that profile is active. Spring resolves properties from multiple places and the higher-precedence one wins.