簡體   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