问题抛出:
先扔一段相关内容:
RestTemplate是Spring Cloud微服务中常用请求模板类,它面向服务的服务间通信调用 RESTful风格调用,支持GET、POST、PUT和DELETE请求并做了一些Http请求(内部http)的封装。
请求参数的类型可以是直接跟在url后面的参数,也可以MultiValueMap类型,也可以是一个Class等等,会由默认或者自配的MessageConverter进行相应的是否可读写判断,再对其进行read或write,以流传输Refer:
A more useful way to consume a REST web service is programmatically. To help you with that task, Spring provides a convenient template class called RestTemplate. RestTemplate makes interacting with most RESTful services a one-line incantation. And it can even bind that data to custom domain types.
to continue…