restful Web 服务必须使用 RestTemplate 吗?或者在给@PostMapping 提供响应实体时可以忽略它?
Is it mandatory to use RestTemplate for restful web services? Or it can be ignored while giving @PostMapping with response entity in it?
在之前的项目中,我使用 rest 模板调用 restful 网络服务方法。
但现在在新项目中我没有看到其他 template.We 只有 @GetMapping
/@PostMapping
我们使用响应实体的地方。
那么 restful 网络服务不是必须使用 rest 模板吗?
RTFM,好友 ;)
NOTE: As of 5.0, the non-blocking, reactive
org.springframework.web.reactive.client.WebClient offers a modern
alternative to the RestTemplate with efficient support for both sync
and async, as well as streaming scenarios. The RestTemplate will be
deprecated in a future version and will not have major new features
added going forward.
在之前的项目中,我使用 rest 模板调用 restful 网络服务方法。
但现在在新项目中我没有看到其他 template.We 只有 @GetMapping
/@PostMapping
我们使用响应实体的地方。
那么 restful 网络服务不是必须使用 rest 模板吗?
RTFM,好友 ;)
NOTE: As of 5.0, the non-blocking, reactive org.springframework.web.reactive.client.WebClient offers a modern alternative to the RestTemplate with efficient support for both sync and async, as well as streaming scenarios. The RestTemplate will be deprecated in a future version and will not have major new features added going forward.