Profile-specific properties go in separate files or sections marked by --- and profile name.
Step 2: Identify correct profile override format
spring.datasource.url=jdbc:mysql://prod-db:3306/prod
---
spring.datasource.url=jdbc:mysql://test-db:3306/test
spring.profiles.active=test shows a YAML style with --- separator and profile active set, which is correct for profile overrides.
Final Answer:
Use --- separator and spring.profiles.active=test -> Option A
Quick Check:
Profile overrides use --- and spring.profiles.active [OK]
Quick Trick:Use --- and spring.profiles.active for profile overrides [OK]
Common Mistakes:
Trying to override in same file without profile section
Using invalid syntax with brackets or equals
Not activating the profile
Master "Application Configuration" in Spring Boot
9 interactive learning modes - each teaches the same concept differently