繁体   English   中英

具有Zookeeper依赖项的Spring Cloud在第二个生命力中获得NullException

[英]Spring cloud with zookeeper dependencies get NullException in the second vister

我有一个名称为

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

我用配置设置客户端

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

所以我可以用这个名字设置假客户端注释

@FeignClient(value = "PayService")

现在我得到一个NullException当我访问了FeignClient第二次。

我的springcloud版本是Finchley.SR1

我将完整的代码推送到github: https : //github.com/kanghouchao/sample-springcloud.git

我做错了什么?

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

首先,我将springcloud版本从Finchley更改为Edgware.SR5,并将springboot更改为1.5.13.RELEASE。 然后,我在服务器端添加了spring-boot-starter-actuator依赖项,并且工作正常。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM