huifer opened this issue 5 years ago · 0 comments
@RestController @RequestMapping("/demo") public class DemoController { @GetMapping("/{id:\\d+}") public String obj( @PathVariable("id") String id ) { return id; } }
通过:正则来进行url参数过滤,或者说url不存在
:正则