@Autowired RestTemplate restTemplate;
+
+Traverson traverson = new Traverson(URI.create("http://some/address"),
+ MediaType.APPLICATION_JSON, MediaType.APPLICATION_JSON_UTF8).setRestOperations(restTemplate);
+// use Traverson
+diff --git a/spring-cloud-sleuth.html b/spring-cloud-sleuth.html index e89f7c371..5b0b922d2 100644 --- a/spring-cloud-sleuth.html +++ b/spring-cloud-sleuth.html @@ -528,6 +528,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
If you’re using the Traverson library
+it’s enough for you to inject a RestTemplate as a bean into your Traverson object. Since RestTemplate
+is already intercepted, you will get full support of tracing in your client. Below you can find a pseudo code
+of how to do that:
@Autowired RestTemplate restTemplate;
+
+Traverson traverson = new Traverson(URI.create("http://some/address"),
+ MediaType.APPLICATION_JSON, MediaType.APPLICATION_JSON_UTF8).setRestOperations(restTemplate);
+// use Traverson
+