spring config 配置查看刷新

配置刷新
1.  本服务刷新
POST http://localhost:8081/config/actuator/refresh

2.  通过服务总线刷新(所有服务全部刷新)
POST http://localhost:8081/config/actuator/bus-refresh


查看配置:
不带参数,参看所有运行时配置;
http://localhost:8081/config/actuator/env?pattern=xx.*

配置修改(服务总线修改,修改之后其它服务需要刷新才会生效):
POST http://localhost:8081/config/actuator/bus-env


    "name":"htcf.env1",
    "value":"value"
}
---- 修改之后调用刷新(也可以调用 actuator/bus-refresh,这会发送mq消息)
POST http://localhost:8081/config/actuator/refresh


/actuator/env 
由 org.springframework.boot:spring-boot-actuator 包提供

/actuator/refresh
由 org.springframework.cloud:spring-cloud-context 包提供
-- 这个路径真是绝了,害我找了半天


/actuator/bus-env,/actuator/bus-refresh
由 org.springframework.cloud:spring-cloud-bus 包提供

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值