Card 06/ 06

RecapDifficulty: Advanced1 min

What This Topic Established

Properties come from several sources at once, in a fixed order — a command-line argument beats a profile-specific file, which beats the base application.properties. Verified: the same jar, the same file, a different effective value from one argument.

A profile groups a whole set of properties behind one name, switched on with --spring.profiles.active. @Value reads one property at a time; @ConfigurationProperties binds a whole related group into one typed class, and is the better choice once there's more than one or two.