简体   繁体   English

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

[英]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. 现在我得到一个NullException当我访问了FeignClient第二次。

My springcloud version is Finchley.SR1 我的springcloud版本是Finchley.SR1

I push the complete code to github: https://github.com/kanghouchao/sample-springcloud.git 我将完整的代码推送到github: https : //github.com/kanghouchao/sample-springcloud.git

What did I do wrong? 我做错了什么?

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

First I changed the springcloud version from Finchley to Edgware.SR5 and springboot to 1.5.13.RELEASE. 首先,我将springcloud版本从Finchley更改为Edgware.SR5,并将springboot更改为1.5.13.RELEASE。 Then I added the spring-boot-starter-actuator dependency on the server side and it works fine. 然后,我在服务器端添加了spring-boot-starter-actuator依赖项,并且工作正常。

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

相关问题 Spring cloud zookeeper Config - 为zookeeper设置ACL - Spring cloud zookeeper Config - Set ACL for zookeeper 适用于Spring Cloud应用程序的带云配置的ZooKeeper - ZooKeeper with cloud config for Spring Cloud application 如何配置区域Spring Cloud Zookeeper - How to configure zone Spring Cloud Zookeeper Spring Cloud Ribbon Zookeeper中的自定义Loadblancer规则 - Custom Loadblancer rule in Spring cloud Ribbon Zookeeper 如何将Apache ZooKeeper与Spring Cloud服务发现和负载平衡一起使用? - How to use Apache ZooKeeper with Spring Cloud service discovery and load balancing? Docker 为 Zookeeper 和 Spring 云编写 - 我的服务未连接到动物园 - Docker compose for Zookeeper and Spring Cloud - my service does not connect to zoo zookeeper与spring cloud配置服务器有什么区别? - What's the difference between zookeeper vs spring cloud config server? Spring Cloud Zookeeper 和 Feign 部署在使用 Fargate 的 AWS ECS 上 - Spring Cloud Zookeeper and Feign deployed on AWS ECS with Fargate 使用Kafka经纪人的Dockerized Spring Cloud Stream服务无法连接到Zookeeper - Dockerized Spring Cloud Stream services with Kafka broker unable to connect to Zookeeper 执行集成测试时如何禁用Spring Cloud Zookeeper - How to disable spring cloud zookeeper when executing integration test
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM