Difference between the annotations @GetMapping and @RequestMapping(method = RequestMethod.GET)

前端 未结 4 1684
南旧
南旧 2020-12-12 14:19

What\'s the difference between @GetMapping and @RequestMapping(method = RequestMethod.GET)?
I\'ve seen in some Spring Reactive examples, that

4条回答
  •  长情又很酷
    2020-12-12 14:35

    As you can see here:

    Specifically, @GetMapping is a composed annotation that acts as a shortcut for @RequestMapping(method = RequestMethod.GET).

    Difference between @GetMapping & @RequestMapping

    @GetMapping supports the consumes attribute like @RequestMapping.

提交回复
热议问题