首页 > 解决方案 > Spring config 客户端配置未使用“/actuator/refresh”端点更新

问题描述

我正在使用 Spring 2.0.3。配置客户端的数据库配置是通过配置服务器从 git 存储库获取的。

我已更改数据库配置并推回 git。

然后,我调用了“ http://client_host/actuator/refresh ”端点来加载新配置。

我已经在 application.yml 文件中公开了“刷新”端点。结果是,配置服务器调用 git 存储库,并且可以将新配置保存在“/tmp/repos”中。

但是配置客户端无法更新数据库配置?

你能帮我解决这个问题吗?

标签: spring-bootmicroservicesspring-cloud-config

解决方案


http://client_host/actuator/refresh " 只会更新静态配置,而 /actuator/bus-refresh 或 /bus/refresh 将更新所有动态配置,它会触发所有云客户端刷新它们的实例。


推荐阅读