@RequestMapping("/car/{id}/owner/{username}")
public Map<String,Object> getCar(@PathVariable("id") Integer id,
@PathVariable("username") String name,
@PathVariable Map<String,String> pv)
{
Map map=new HashMap();
map.put("id", id);
map.put("username", name);
map.put("pv", pv);
return map;
}
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210617091244826.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0pvc2hSb25n,size_16,color_FFFFFF,t_70)
@RequestMapping("car")
public Map<String,Object> getCar(@RequestHeader("User-Agent") String userAgent,
@RequestHeader Map<String,String> header)
{
Map map=new HashMap();
map.put("userAgent", userAgent);
map.put("header",header);
return map;
}
![在这里插入图片描述](https://img-blog.csdnimg.cn/2021061709183179.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0pvc2hSb25n,size_16,color_FFFFFF,t_70)
@RequestMapping("car")
public Map<String,Object> getCar(@CookieValue("_ga") Cookie cookie)
{
Map map=new HashMap();
map.put("cookie", cookie.getValue());
return map;
}
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210617093330270.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0pvc2hSb25n,size_16,color_FFFFFF,t_70)