@GetMapping和@PostMapping 和@Reque
2019-08-07 本文已影响0人
海染蓝了天
@GetMapping具体来说就是@RequestMapping的简写@RequestMapping(method = RequestMethod.GET)
@PostMapping-@PutMapping-@PatchMapping-@DeleteMapping都是一样的
假如@RequestMapping(/path)它告诉Spring任何带有/path的HTTP请求都应该映射到home方法。

具体如果想了解更多,可前往spring 官网https://spring.io/查询