热门搜索 :
考研考公
您的当前位置:首页正文

Spring Cloud Consul Config key/v

来源:东饰资讯网
spring:
  profiles:
    active: prod
  cloud:
    consul:
      config:
        enabled: true
        acl-token: xxxxx
        prefix: sns
        name: jarvis
        format: key_value
        watch:
          enabled: false
image.png

这样就可以完全替换掉application.yml

这里设置spring.cloud.watch.enabled 为false, 不想去监听配置的更改, 配置更改时,手动需要重启服务,这样更安全一点。

Top