Hello
When using zookeeper as the registry, config-client cannot discover config-server through service-id, configServer can only be called through spring.cloud.config.uri
.
configServer can register to ZK.
SpringCloudVersion: Hoxton.SR1 SpringBootVersion: 2.2.5.RELEASE zkVersion: 3.6.3
configServer conf:
spring:
cloud:
zookeeper:
discovery:
enabled: true
register: true
root: /server
instance-host: ${spring.cloud.client.ip-address}
connect-string: zk1:2181,zk2:2182,zk3:2183
configClient conf:
spring:
cloud:
config:
name: account
discovery:
enabled: true
service-id: config-center
fail-fast: true
retry:
initial-interval: 3000
max-attempts: 20
max-interval: 5000
username: root
password: 123456
Comment From: Dog4j
Solved add spring.main.allow-bean-definition-overriding: true