Closed wenfei3 closed 6 years ago
Well,I found a phenomenon . If I use
<dependency>
<groupId>org.springframework.cloud</groupId>
<! -- <artifactId>spring-cloud-starter-zookeeper-all</artifactId> -- >
<artifactId>spring-cloud-starter-zookeeper-discovery</artifactId>
</dependency>
in my pom,the application.yml will work.I know the reason of my problem.
spring-cloud-starter-zookeeper-all
will introduce the zk config, zk config must use bootstrap.yml.
Is it right?
That is correct
Hello , I have met a problem about the application.yml when I was building a service discovery with spring-cloud-zookeeper.
pom
application.yml
exception
the app connect to localhost:2181,but not localhost:2222.It will work If I change the yml file's name from application.yml to bootstrap.yml .I guess the zk client start time is earlier than the application.yml be read. So do I have to add a bootstart.yml to my project?