[英]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 Web服務方法。
但是現在在新項目中我沒有看到rest模板,我們只有@GetMapping
/ @PostMapping
在其中使用響應實體。
那么,不是必須將rest模板用於restful web服務嗎?
RTFM,好友;)
注意:從5.0開始,無阻塞,反應式org.springframework.web.reactive.client.WebClient提供了RestTemplate的現代替代方案,有效支持同步和異步以及流方案。 RestTemplate將在將來的版本中棄用,並且以后將不會添加主要的新功能。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.