コード例 #1
0
 @RequestMapping(method = RequestMethod.GET, value = ApiUrls.URL_USERS_USER)
 HttpEntity<Resource<User>> loadUser(@PathVariable Long user) {
   Resource<User> resource = this.userResourceAssembler.toResource(crmService.findById(user));
   return new ResponseEntity<Resource<User>>(resource, HttpStatus.OK);
 }
コード例 #2
0
 @RequestMapping(method = RequestMethod.DELETE, value = ApiUrls.URL_USERS_USER)
 HttpEntity<Resource<User>> deleteUser(@PathVariable Long user) {
   Resource<User> userResource = userResourceAssembler.toResource(crmService.removeUser(user));
   return new ResponseEntity<Resource<User>>(userResource, HttpStatus.OK);
 }