password « Connection « JPA Q&A

2. Hot to set up Datasource and external password

3. is there a way to encrypt the connection.password?

If you are writing a standalone program you can use the following syntax to hide the password. ${secret.db.password} This special syntax (the dollar sign and squirrely braces) tells Hibernate to get the password out of the System properties using the string (secret.db.password in the above example) as the key instead of just interpreting the string as the plain text password. ...