SpringMVC之组合注解@GetMapping


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

  Difference between @GetMapping & @RequestMapping:
@GetMapping does not support  the consumes attribute of @RequestMapping.


原文链接:https://blog.csdn.net/webzhuce/article/details/53319468


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM