spring-cloud-zookeeper icon indicating copy to clipboard operation
spring-cloud-zookeeper copied to clipboard

Unable to provide multiple zookeeper host via spring.config.import property

Open hanson76 opened this issue 3 years ago • 1 comments

We have a case where we need to provide multiple ip addresses to spring cloud zookeeper (one for each node in the cluster) We tried to use spring.config.import=zookeeper:ip1:2181,ip2:2181,ip3:2181 Spring Boot fails to start with an error stating that ip3:2181 can't be loaded.

It is easily verified by creating the minimal spring boot application when spring cloud config zookeeper and add the following property spring.config.import=zookeeper:localhost:2181,localhost:2181

Do we need to use another syntax to provide the list of ip addresses to Spring Cloud Config ZooKeeper?

hanson76 avatar Mar 24 '23 09:03 hanson76

Might found a solution, we probably did not read or understood the documentation.. It looks to work if we set spring.cloud.zookeeper.connect-string=ip1:2181,ip2:2181,ip3:2181 and then use spring.config.import=zookeeper: (without ip addresses)

hanson76 avatar Mar 24 '23 09:03 hanson76