Setting properties with environment variables
A configurable application wouldn’t be complete if there weren’t a way to configure it straight from the command line. This is of key value because no matter how much thought and design we put into our applications, something will always pop up.
Being stuck with a bundled-up application and no way to override the various property files stuffed inside it would be a showstopper.
Don’t do this!
Maybe you’ve run into situations where you need to unpack the JAR file, edit some property files, and bundle it back up. Do not do this! This is a hack that may have skated by 20 years ago, but it just doesn’t cut it today. In today’s age of controlled pipelines and secured release processes, it’s simply too risky to manually get your hands on a JAR file and tweak it like that. And thanks to the real-world experience of the Spring team, there’s no need to do that.
You can easily override...