簡體   English   中英

是否必須將RestTemplate用於寧靜的Web服務? 還是在給@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 Web服務方法。

但是現在在新項目中我沒有看到rest模板,我們只有@GetMapping / @PostMapping在其中使用響應實體。

那么,不是必須將rest模板用於restful web服務嗎?

RTFM,好友;)

注意:從5.0開始,無阻塞,反應式org.springframework.web.reactive.client.WebClient提供了RestTemplate的現代替代方案,有效支持同步和異步以及流方案。 RestTemplate將在將來的版本中棄用,並且以后將不會添加主要的新功能。

https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/client/RestTemplate.html

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM