我们计划将 Spring sleuth 集成到我们的 Spring 云微服务应用程序中。但是,当服务 A 使用 RestTemplate 调用服务 B 时,我们会收到 RibbonLoadBalancerClient 异常。请在下面找到堆栈跟踪。
ResponseObject genericResponse = restTemplate.exchange(expandedUrl, HttpMethod.GET, new HttpEntity<>(null), ResponseObject.class).getBody();
Logger.log(DEBUG, "getDetails returned {} ", response);
return genericResponse.getData().getInformation();
正在使用的版本如下
- Spring Boot:springBootVersion = '1.5.3.RELEASE'
- Spring Sleuth:spring-cloud-starter-sleuth:1.2.4.RELEASE
- Spring Cloud 依赖项:spring-cloud-services 依赖项:1.2.0.RELEASE,spring-cloud-dependencies:Brixton.RELEASE
异常 - 堆栈跟踪:org.springframework.web.util.NestedServletException:处理程序调度失败;嵌套异常是 java.lang.AbstractMethodError: org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.execute(Ljava/lang/String;Lorg/springframework/cloud/client/ServiceInstance;Lorg/springframework/cloud/client/loadbalancer/LoadBalancerRequest ;)Ljava/lang/Object;| 在 org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:978)| 在 org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)| 在org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)|