问题描述
我正在使用 discovery first bootstrapping 方法,其中配置服务器正在注册到发现服务器。 两个 Spring Cloud Config 服务器在 8002 和 8003 端口上运行。
下面是配置客户端的 application.yml 文件。
server:
port: 8001
servlet:
context-path: /api/v1/config-ser
spring:
application:
name: configser
cloud:
config:
fail-fast: true
discovery:
enabled: true
service-id: conser
eureka:
instance:
leaserenewalIntervalInSeconds: 10
client:
fetch-registry: true
serviceUrl:
defaultZone: http://localhost:8761/eureka,http://localhost:8762/eureka
每次这个客户端启动时,日志总是从一台服务器获取配置
INFO 24472 --- [main] c.c.c.ConfigServicePropertySourceLocator:从服务器获取配置:http://localhost:8002
8002 和 8003 都在发现服务器上注册。
查询:应该如何配置配置服务器客户端,使其可以通过服务发现连接到任一可用的配置服务器。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)