Spring Boot’s main config file.

Supports multiple env

Profile Description
application-local.yml Local development settings (DB, debug logs, ports)
application-prod.yml Production environment settings (secure DB, optimizations)
application-test.yml For testing or CI/CD pipelines

How Spring Boot chooses profile:

  1. Command line
java -jar myapp.jar --spring.profiles.active=prod

  1. Env var
SPRING_PROFILES_ACTIVE=prod

  1. In application.yml (less common)
spring:
	profiles:
		active:local

Overriding rules: