how to capture multiple parameters using @RequestParam using spring mvc?

前端 未结 6 1446
独厮守ぢ
独厮守ぢ 2020-11-30 01:34

Suppose a hyperlink is clicked and an url is fired with the following parameter list myparam=myValue1&myparam=myValue2&myparam=myValue3 . Now how can I

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-30 02:25

    It seems you can't get

    Map
    

    because all your params have same name "myparam"

    Try this instead:

    public ModelAndView method(@RequestParam("myparam") List params) { }
    

提交回复
热议问题