You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/03/11 07:18:20 UTC

[GitHub] [servicecomb-java-chassis] five111 opened a new issue #2291: 关于使用CompletableFuture 替代 AsyncRestTemplate 有几个疑问

five111 opened a new issue #2291:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2291


   1、如果继续使用AsyncRestTemplate的话,会有哪些风险
   2、官方给的示例是将一个AsyncRestTemplate发rest请求,改造成立通过CompletableFuture 使用rpc的方式进行通信,如果想使用CompletableFuture 发rest请求,有没有demo可供参考?


----------------------------------------------------------------
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.

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2291: 关于使用CompletableFuture 替代 AsyncRestTemplate 有几个疑问

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #2291:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2291#issuecomment-796539507


   没有什么风险,只是spring将AsyncRestTemplate标记为deprecated, 使用的时候,会有编译警告,一般不建议使用deprecated的类。 
   
   参考使用[异步调用](https://docs.servicecomb.io/java-chassis/zh_CN/build-provider/reactive/)。 


----------------------------------------------------------------
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.

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



[GitHub] [servicecomb-java-chassis] five111 closed issue #2291: 关于使用CompletableFuture 替代 AsyncRestTemplate 有几个疑问

Posted by GitBox <gi...@apache.org>.
five111 closed issue #2291:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2291


   


-- 
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: commits-unsubscribe@servicecomb.apache.org

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



[GitHub] [servicecomb-java-chassis] wujimin commented on issue #2291: 关于使用CompletableFuture 替代 AsyncRestTemplate 有几个疑问

Posted by GitBox <gi...@apache.org>.
wujimin commented on issue #2291:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2291#issuecomment-796566931


   `改造成立通过CompletableFuture 使用rpc的方式进行通信,如果想使用CompletableFuture 发rest请求(jdk 8)`  
   接口方式调用,与是否发rest请求,是没有耦合的


----------------------------------------------------------------
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.

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