亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

這樣方法是不是只能針對于post請求,參數為實體類的情況

如標題,這種可以返回

https://img1.sycdn.imooc.com//5c6f820e0001a7fc10610284.jpg

但如果是get請求,傳字符串參數,

https://img1.sycdn.imooc.com//5c6f82b90001ac7408060256.jpg

返回值:

{

? ? "code": -1,

? ? "msg": "An Errors/BindingResult argument is expected to be declared immediately after the model attribute, the @RequestBody or the @RequestPart arguments to which they apply: public com.example.demo.model.CommonMsg com.example.demo.controller.UservisitorController.SelectAll(org.springframework.validation.BindingResult)",

? ? "data": null

}


正在回答

1 回答

get 請求怎么會有表單驗證呢?只有 Post 請求才會提交數據,有驗證的需求吧。

0 回復 有任何疑惑可以回復我~
#1

_小北 提問者

我理解錯誤,表述也有問題。明白了,謝謝
2019-03-05 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

這樣方法是不是只能針對于post請求,參數為實體類的情況

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號