Has problems after @PathVariable parameter value containing the '/' character,with Spring MVC

后端 未结 2 1281
广开言路
广开言路 2020-12-22 10:18

I have a use case. Spring MVC REST Url receive content using the GET method code is as follows:

@RequestMapping(\"/q/{key}\")
public String query(@PathVariab         


        
2条回答
  •  清酒与你
    2020-12-22 10:35

    Annotations of @ PathVariable may not be able to solve this problem.Last use the workaround is resolved.Code is as follows:

    @RequestMapping("/q/**")
    

提交回复
热议问题