postman傳送post請求,用request.getParameter()獲取請求引數注意事項
後臺springMVC用request.getParameter()獲取請求引數的話,在postman傳送請求時,body選取x-www-form-urlencoded,Headers部分是key: Content-Type----------value: application/x-www-form-urlencoded。
當然,也可以使用其他方式獲取請求引數如@RequestBody 實體類 實體變數名來自動封裝請求引數到實體中,如用post請求方式傳送請求,引數是json格式,那麼Header的值要選application/json;charset=utf-8
僅當記錄