0

Current code:

@RequestMapping(path = "/user", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity get(@RequestParam(value="id", defaultValue="") String id) {}

This will work for URLs like /user to return all users and /user?id=123 to return a specific user.

Is there a way to achieve real REST URLs so that /user/123 will return the user with the ID 123?

Ali Dehghani
  • 43,096
  • 14
  • 154
  • 142
Chris
  • 4,129
  • 6
  • 40
  • 82

0 Answers0