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
  • 46,221
  • 15
  • 164
  • 151
Chris
  • 4,255
  • 7
  • 42
  • 83

0 Answers0