Decrypt Secure data source access credentials of application.properties

Hi,

I want to Secure data source access credentials in application.properties and decrypt or getvalues the username/password from java file or with in project. I am trying AES encryption

i tried below code but i am getting

Unable to connect to database for generating Liquibase changelogs:
FATAL: password authentication failed for user “${myuser}”
Check Data Store connection parameters.
com.haulmont.jmixstudio.exceptions.SilentException: Unable to connect to database for generating Liquibase changelogs:
FATAL: password authentication failed for user “${myuser}”
Check Data Store connection parameters.
at com.haulmont.jmixstudio.backend.ed.ddl.DbManager.dbExists(DbManager.java:235)

main.datasource.password-encryption=myDatasourcePasswordEncryption
main.datasource.url = jdbc:postgresql://localhost/databasename
main.datasource.username = postgres
main.datasource.password =${jmix.datasource.password-encryption.encryptPassword('myPassword')}

i tried other way also but still getting same error

#main.datasource.url=jdbc:postgresql://localhost/databasename
#main.datasource.username=${myuser}
#main.datasource.password=${mypassword}

Jmix Studio supports datasource connection parameters set by environment variables, for example:

main.datasource.password=${MY_PASSWORD:123}

See Data Stores :: Jmix Documentation

Is there any mini project to understand ?
Thank you in advance

A project would contain nothing special but that line in the application.properties. The MY_PASSWORD variable should be set in the OS env variables. If it’s not set, the default value 123 is used.