spring-boot-demo
spring-boot-demo copied to clipboard
【WEB系列】WebClient之同步与异步 | 一灰灰Blog
http://spring.hhui.top/spring-blog/2020/08/20/200820-SpringBoot%E7%B3%BB%E5%88%97WebClient%E4%B9%8B%E5%90%8C%E6%AD%A5%E4%B8%8E%E5%BC%82%E6%AD%A5/
回顾一下最开始介绍WebClient的使用姿势之前,我们介绍了AsyncRestTemplate来实现异步的网络请求;但是在Spring5之后,官方推荐使用WebClient来替换AsyncRestTemplate实现异步请求;所以一般来讲,WebClient适用于异步的网络访问,但是,假设我需要同步获取返回结果,可行么?