Search code examples
spring-cloudspring-cloud-zookeeper

Spring cloud with zookeeper dependencies get NullException in the second vister


I have an application with the name

spring:
  application:
    name: /business/paysystem-service

and I setting the client with the configuration

spring:
zookeeper:
  dependencies:
    PayService:
      path: /business/paysystem-service

so I can set feign client annotation with this name

@FeignClient(value = "PayService")

now I get a NullException when I visit the FeignClient the second time.

My springcloud version is Finchley.SR1

I push the complete code to github:https://github.com/kanghouchao/sample-springcloud.git

What did I do wrong?


Solution

  • 首先我更换了springcloud版本,从Finchley改到Edgware.SR5,同时springboot更换到1.5.13.RELEASE。 然后我在server端添加了spring-boot-starter-actuator依赖,运行正常了

    First I changed the springcloud version from Finchley to Edgware.SR5 and springboot to 1.5.13.RELEASE. Then I added the spring-boot-starter-actuator dependency on the server side and it works fine.