I have similar requirement, i have a db params in properties file.. at startup i need to encrypt the sensitive data and overwrite the properties file (with encrypted values). and while getting the db connection i need to decrypt internally and use for connection. Any suggestions please.