Level 1 · Apprentice0 XP
One build, many environments, and no secret in the code.
Step 1 / 5
ProblemThe production database password sits in a file in the repository. Staging uses a copy of the file with three lines changed, and the copies have drifted apart. A typo in a property name fails silently, because the value is read as a string somewhere deep in the code.
← → step
Before this: How auto-configuration decides
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Create a @ConfigurationProperties class for one feature with validation. Start the application with a missing required value and read the error. Then override one value three ways (profile file, environment variable, command line) and note which wins.