服務端 rest api
@RequestMapping(value = "/phone")
public ResponsePhone getPhone(@RequestParam String uid, @RequestParam List<String> orderidlist){}
客戶端
@RequestMapping(value = "/phone")
ResponsePhone getPhone(@RequestParam String uid, @RequestParam List<String> orderidlist)
上面這樣寫 會在啟動的時候報錯。
原因是 不會自動獲取 傳遞的參數名稱 如 uid orderidlist
改成
@RequestMapping(value = "/phone")
ResponsePhone getPhone(@RequestParam(value = "uid") String uid, @RequestParam(value = "orderidlist") List<String> orderidlist) {}