Spring获取url路径中的参数

 @GetMapping("/{id}")
    public User findById(@PathVariable String id) {
        return userService.findByid(id);
    }