I'm creating standalone application (GUI-based on Swing). It will be like password holder (eg login / passwords for user specified sites)
It connects to remote psql database. And connection to the database stores in db.properties files.
What I would like:
I recommend storing the DB credentials in an environment variable and having the source code read in the value.
This prevents having to store the credentials in source control or binaries but allows you to easily provision/change your secrets.
This has become a best practice included in "12 factor apps" and models the way Heroku and other hosting services manage application level config.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.