Spring @RequestMapping中的method

method 

method属性是指请求的方式。

组合注解(RequestMapping的变形)

@GetMapping = @(method = RequestMethod.GET)

@PostMapping = @RequestMapping(method = RequestMethod.POST)

@PutMapping = @RequestMapping(method = RequestMethod.PUT)

@DeleteMapping = @RequestMapping(method = RequestMethod.DELETE)

组合注解是方法级别的,只能用在方法上,我们的实例基本都用组合注解。

你可能感兴趣的:(Spring @RequestMapping中的method)