1
我試圖使用rest模板調用服務,並且收到404錯誤。404當從resttemplate調用post時
這是一個POST。方法的簽名是
String sendScreenAsPostcard(@RequestBody MultiValueMap<String, Object> params)
我打算從resttemplate用下面的代碼調用它。
restTemplate.exchange(
"http://localhost:8080/sendScreeenAsPostCard",
HttpMethod.POST,
new HttpEntity<MultiValueMap<String, Object>>(parameters, headers),
String.class
).getBody()
請指教我做錯了什麼。謝謝。
sendScreeenAsPostCard vs sendScreeenAsPostcard – Karussell