Card 02/ 06

ExampleDifficulty: Intermediate1 min

A Command-Line Argument Beats the File

application.propertiestext
server.port=8080
text
$ java -jar app.jar
effective port: 8080

$ java -jar app.jar --server.port=9090
effective port: 9090
run in a container, Spring Boot 3.3.4 — same file, same jar, different argument

Nothing about application.properties changed between the two runs. The command-line argument arrived later in Spring Boot's own resolution order and won, exactly as the previous card's ordering predicts.