Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow more flexible environment settings #146

Merged
merged 4 commits into from
Aug 20, 2019
Merged

Conversation

harawata
Copy link
Member

  1. Migrations can read environment settings from environment variables or system properties.
  2. In the properties file, variable expressions ${} are replaced if there is a matching system property or environment variable.

Regarding 1 ...

  • Settings are read in the following order of priority (high to low)
    1. System property
    2. Environment variable
    3. Properties file
  • System property and environment variable must be declared under the name with prefix (e.g. MIGRATIONS_USERNAME, MIGRATIONS_PASSWORD).

Should close #114 and replace #128 and #144 .

…bles

Testing only system properties.
If I found a good way to prepare environment variables, I'll add it later.
…perties

Variables must be declared with a name with prefix (e.g. `MIGRATIONS_VAR1`).
The name is converted to lower case (e.g. `MIGRATIONS_VAR1` -> `var1`).
@h3adache h3adache merged commit ac708a7 into mybatis:master Aug 20, 2019
@harawata harawata modified the milestone: 3.3.6 Aug 20, 2019
harawata added a commit that referenced this pull request Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow environment configuration override via Java System Properties or Environment Variables
2 participants