标签:ppi 哪些 https str dep 提供者 (十一) 客户端 int
<!-- 包含了sleuth+zipkin --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-zipkin</artifactId> </dependency>
@GetMapping("/payment/zipkin ") public String paymentZipkin() { return "Hi, I am paymentZipkin server fall back"; }
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-zipkin</artifactId> </dependency>
spring:
application:
name: cloud-order-service
zipkin:
base-url: http://localhost:9411
sleuth:
sampler:
probability: 1
@GetMapping("/consumer/payment/zipkin") public String paymentZipkin() { String result = restTemplate.getForObject("http://localhost:8001" + "/payment/zipkin/", String.class); return result; }
springcloud-分布式请求链路追踪Sleuth(十一)
标签:ppi 哪些 https str dep 提供者 (十一) 客户端 int
原文地址:https://www.cnblogs.com/binwenhome/p/13254111.html