//給微信公眾號發送模板資訊,傳遞一個post請求,微信端也接受資料成功,但是后臺會報一個Request method 'POST' not supported
用了wxjava框架和寫都可以發送模板成功
但是都會報Request method 'POST' not supported 例外
用的是若依框架,springboot,但是 restTemplate 的get請求沒問題,就只有POST報錯
@GetMapping("/sendMessage")
public String sendMessage(ModelMap mmap)
{
ResponseEntity<String> apiResponse = restTemplate.postForEntity
(
url,
o,
String.class
);
return "";
}
uj5u.com熱心網友回復:
@GetMapping 你這定義死了,只有能get請求uj5u.com熱心網友回復:
改成PostMappinguj5u.com熱心網友回復:
換了post也沒用轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/173425.html
標籤:Web 開發
上一篇:關于類加載器的一個小問題 求助.
下一篇:給已有的介面加個新的欄位
