Spring4.3中引进了{@GetMapping
、@PostMapping
、@PutMapping
、@DeleteMapping
、@PatchMapping
},来帮助简化常用的HTTP
方法的映射,并更好地表达被注解方法的语义。
以@GetMapping
为例:
@GetMapping
是一个组合注解,是@RequestMapping(method = RequestMethod.GET)
的缩写。 该注解将HTTP GET
映射到特定的处理方法上。
Spring4.3中引进了{@GetMapping
、@PostMapping
、@PutMapping
、@DeleteMapping
、@PatchMapping
},来帮助简化常用的HTTP
方法的映射,并更好地表达被注解方法的语义。
以@GetMapping
为例:
@GetMapping
是一个组合注解,是@RequestMapping(method = RequestMethod.GET)
的缩写。 该注解将HTTP GET
映射到特定的处理方法上。