RequestParam value in spring MVC to be case insensitive

前端 未结 6 2136
离开以前
离开以前 2021-01-17 20:40

Am sending data from JSP to controller using query string.

My controller is annotation driven.

The value of the the request parameter should be case-insensit

6条回答
  •  無奈伤痛
    2021-01-17 21:21

    You'll have to try changing the way Spring matches your urls . You could for one, create a filter (probably a DelegatingFilterProxyBean) to lower case your parameter before you pass it on to Spring or try to change the way the paths are matched .

    An explanation to the second options is given at How can I have case insensitive URLS in Spring MVC with annotated mappings .

提交回复
热议问题