@RequestMapping, @GetMapping and @PostMapping in Spring

@RequestMapping Originally, Spring had only @RequestMapping annotation for mapping all the incoming HTTP request URLs to the corresponding controller methods. @RequestMapping(value = "/users", method = RequestMethod.GET) public Users getUsers() { } @RequestMapping(value = "/users", method = RequestMethod.POST) public User createUser(User user) { } @RequestMapping(value = "/users/{id}", method = RequestMethod.GET) public User getUser(@PathVariable("id") String id) { …