GetMapping 注解已经默认封装了@RequestMapping(method = RequestMethod.GET)
所以,比前文 使用 @RequestMapping(path = “/{city_id}/{user_id}”,method = RequestMethod.GET) 更方便
本文介绍@GetMapping如何简化处理HTTP GET请求的方式。它等效于使用@RequestMapping并指定method为RequestMethod.GET。这种方式使得控制器方法更加清晰和简洁。
GetMapping 注解已经默认封装了@RequestMapping(method = RequestMethod.GET)
所以,比前文 使用 @RequestMapping(path = “/{city_id}/{user_id}”,method = RequestMethod.GET) 更方便
5095
2568

被折叠的 条评论
为什么被折叠?
