Spring Cloud 微服务开发:入门、进阶与源码剖析 —— 8.4 Spring Cloud Config 手动配置刷新

8.4 Spring Cloud Config 手动配置刷新

上一节,我们介绍了Spring Cloud Config最基本的使用方式,最后留了一个问题,远端信息改变后,Client端并不会实时去获取最新信息,关于这个问题,可以有两种解决方案,下面,我们开始逐个介绍。

8.4.1 手动刷新配置

  1. 创建工程config_client_refresh,工程依赖pom.xml如下:

代码清单:ch8_1/ch8_1_config_client_refresh/pom.xml


<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId

猜你喜欢

转载自blog.csdn.net/meteor_93/article/details/104262032
今日推荐