consul

## Configuration Center Related
asjard:
  config:
    ## Consul configuration center related configuration
    consul:
      ## Configuration center name
      ## Configuration that depends on asjard.stores.consul.clients.{cllient}
      # client: default
      ## Delimiter
      ## Delimiter between multiple keys in consul
      # delimiter: "/"

Configuration priority

Priority increases from top to bottom, multiple fields are separated by the Englishasjard.config.consul.delimiterseparator, do not end withasjard.config.consul.delimiterending

  • /{app}/configs/: Project-related global configuration

  • /{app}/configs/{env}/: Environment-related global configuration

  • /{app}/configs/service/{group}/: Service-related configuration

  • /{app}/configs/service/{group}/{region}/: Service region-related configuration

  • /{app}/configs/service/{group}/{region}/{az}/: Service region and AZ configuration

  • /{app}/configs/service/{service}/: Service-related configuration

  • /{app}/configs/service/{service}/{region}/: Service region-related configuration

  • /{app}/configs/service/{service}/{region}/{az}/: Service region and AZ configuration

  • /{app}/configs/{env}/service/{group}/: Service-related configuration

  • /{app}/configs/{env}/service/{group}/{region}/: Service region-related configuration

  • /{app}/configs/{env}/service/{group}/{region}/{az}/: Service region and AZ configuration

  • /{app}/configs/{env}/service/{service}/: Service-related configuration

  • /{app}/configs/{env}/service/{service}/{region}/: Service region-related configuration

  • /{app}/configs/{env}/service/{service}/{region}/{az}/: Service region and AZ configuration

  • /{app}/configs/runtime/{instance.ID}/: Instance configuration

If files exist under the same prefix, all configurations in the files have the priority of that prefix

It is recommended not to use key/value style and files at the same time, because they have the same priority under the same prefix, causing differences between startup configuration override and runtime configuration override logic

For example:

Use

Last updated