A startup trace asks which configuration value and schema version a context actually receives.
Spring exercise: trace selected config and staged Boot migrations
Configuration trace
The base file sets batch size 17 and timeout 750ms. The review profile file sets batch size 29 only. Predict the bound record with review active: 29 and 750ms. Next, remove a required imported file. The context fails. Prefix its location with optional: and the example context starts with declared defaults 8 and 2s. The corresponding BootRelaySettingsTest methods check these states.
Now place an unrelated packaged DataSource URL next to a builder default URL. Predict which database Boot opens. The source-kit startup test originally opened the packaged database; it now passes a unique URL as a CLI argument. The priority lesson explains why.
Migration trace
Start one non-web Boot context targeting V2, insert a receipt without tenant_id and close it. Start a second context against the same H2 database targeting V3. Predict the null count and which insert shape fails. Finally change the V2 history checksum and predict whether a third context returns. The checked BootFlywayStartupTest covers these exact boundaries.
Write down what remains unproven: target-engine DDL, simultaneous old/new processes, large backfill and production dependency scope. The exercise has no hosted judge; run the source kit and compare persisted rows and history.
Checked source
mvn -q -Dtest=BootRelaySettingsTest,BootFlywayStartupTest testVerification boundary
BootRelaySettingsTest and BootFlywayStartupTest. The excerpt is shortened; the source kit contains the checked fixture.
Costs and limits
The trace runs in one process with local files and H2. It is not a production deployment rehearsal or a cross-device graded exercise.
Common Mistakes
- Do not infer the active profile from the base file alone.
- Do not expect an optional import to prove the missing file was read.
- Do not claim two sequential contexts are concurrent deployed versions.
Read next
Spring Boot profile files: bind only the selected environment override, Spring Boot config import: fail startup when a required file is missing, Spring Boot migration target: test an old writer before closing the schema, Spring Boot migration history failure: stop context startup on a mismatch.
