[英]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.