file

File configuration source

Directory where configurations are located

  • If the environment variable is setASJARD_CONF_DIRthen read all files in that directory and its subdirectories

  • Otherwise read the environment variableASJARD_HOME_DIRand concatenate the value withconfdirectory, read all files in that directory and its subdirectories

  • If neither of the above two environment variables is set, then readthe executablepeer directoryconfdirectory and all files in its subdirectories

Configuration priority

All file configuration values under the configuration directory have the same priority,

Supported file formats

Use

For example, you can add a yaml file under the configuration directory containing the following

asjard:
  service:
    ## Project name
    ## There may be multiple services under one project
    ## Not effective in real time, you need to restart the service after modification
    app: projectAsjardExample
    ## Current deployment environment, for example: dev, sit, uat, rc, pro, etc.
    environment: "dev"

Encrypted files, filename format

encrypted_{encryption_library_name}.{yaml|yml|json|toml|props|properties}

In the program you can use it like this

Last updated