Spring Boot 获取restful 请求参数
使用注解
@PathVariable
@RequestMapping(value = "/student/detail/{id}/{age}")
public Object params(@PathVariable("id") Integer id, @PathVariable("age") Integer age) {
Map
retMap.put("id", id);
retMap.put("age", age);
return retMap;
}
共有 0 条评论