You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/12/20 11:02:47 UTC

[GitHub] [skywalking-java] PepoRobert edited a comment on pull request #86: Should be consistent with SessionRequestConstructorInterceptor

PepoRobert edited a comment on pull request #86:
URL: https://github.com/apache/skywalking-java/pull/86#issuecomment-997817931


   Use the same code  first request trace   are different  second request trace
   
   ```
   @RequestMapping("/asyncRest")
   public String asyncRest() throws Exception {
       asyncRestTemplate.getForEntity("http://localhost:8080/trace", String.class);
       asyncRestTemplate.getForEntity("http://localhost:8080/trace", String.class);
       return "ok";
   }
   
   @Autowired
   private AsyncRestTemplate asyncRestTemplate;
   
   
    @Bean
       public HttpComponentsAsyncClientHttpRequestFactory clientHttpRequestFactory (){
           final CloseableHttpAsyncClient client = HttpAsyncClients.createDefault();
           return  new HttpComponentsAsyncClientHttpRequestFactory(client);
       }
       @Bean
       public  AsyncRestTemplate asyncRestTemplate(HttpComponentsAsyncClientHttpRequestFactory clientHttpRequestFactory){
           return new AsyncRestTemplate(clientHttpRequestFactory);
       }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org