开发者社区 问答 正文

如何通过Spring Cloud实现配置的自动更新?

如何通过Spring Cloud实现配置的自动更新?

展开
收起
花开富贵111 2024-05-23 14:48:10 82 分享 版权
1 条回答
写回答
取消 提交回答
  • 可以通过Spring Cloud的原生注解@RefreshScope实现配置的自动更新。当Nacos中的配置发生变化时,使用@RefreshScope注解的Bean将会自动刷新其配置值。

    2024-05-23 15:03:07
    赞同 1 展开评论