有关反向通信的最佳方法,请问您有什么想法吗?
Spring Cloud OpenFeign还是WebClient/RestTemplate?
我认为当Spring Cloud网关需要与其他微服务通信时,应使用Feign客户端,而在反向通信时应使用WebClient/RestTemplate。
我错了吗?
有关反向通信的最佳方法,请问您有什么想法吗?
Spring Cloud OpenFeign还是WebClient/RestTemplate?
我认为当Spring Cloud网关需要与其他微服务通信时,应使用Feign客户端,而在反向通信时应使用WebClient/RestTemplate。
我错了吗?
WebClient(RestTemplate已弃用,现在支持WebClient)
支持响应式调用
底层的HTTP客户端库,如Reactor Netty
有两种方式 - 注解和函数式
个人在使用OAuth2创建bean webClient时发现它非常有用,在进行调用之前,需要使用令牌进行身份验证,ServerOAuth2AuthorizedClientExchangeFilterFunction
会通过仅进行一次配置来轻松完成每个调用
OpenFeign