項(xiàng)目中的使用:
1.?服務(wù)提供方寫(xiě)好接口:

2.?服務(wù)調(diào)用方編寫(xiě)RestTemplateConfig:
有兩種寫(xiě)法:
1)

2)

3.?服務(wù)調(diào)用方編寫(xiě)調(diào)用的方法:
分兩種調(diào)用方式,get和post。
1)get調(diào)用方式:

get調(diào)用方式要注意的點(diǎn):傳參需要在url中使用占位符。
2)post調(diào)用方式:

post調(diào)用方式要注意的點(diǎn):傳參需要使用MultiValueMap將參數(shù)封裝好,與get方式不同,get方式是用HashMap封裝的。post方式傳參不需要在url中使用占位符。
結(jié)束。