Maven read environment variable in properties file
问题 How to read system environment variables in a properties file. I am using MyBatis maven plugin for database migrations. MyBatis use properties file basing on the environment. I am trying to read environment variable inside properties file like: development.properties username=${env.username} password=${env.password} Error: FATAL: role "${env.username}" does not exist I stored username and password in a ".profile" file on a mac. What's the correct way to read those variables? 回答1: You should