PathVariable注解

作用

REST风格接口参数获取

代码

@RequestMapping("/testPathVariable/{id}")
    public String testPathVariable(@PathVariable("id") Integer id)
    {
        System.out.println("testPathVariable:"+id);
        return SUCCESS;
    }

你可能感兴趣的:(PathVariable注解)