SpringMVC中请求路径参数使用正则表达式

1     @GetMapping("/user/{id:\d+}")  //使用正则指定Id为数字
2     public User getInfo(@PathVariable String id){
3         ...
4     }
原文地址:https://www.cnblogs.com/fanqisoft/p/10596749.html