コード例 #1
0
 @RequestMapping(
     method = RequestMethod.POST,
     consumes = "application/json",
     produces = "application/json")
 public ResponseEntity createClub(@Valid @RequestBody ClubData clubData) {
   clubService.createClub(clubData);
   return new ResponseEntity(HttpStatus.CREATED);
 }
コード例 #2
0
 @RequestMapping(value = "/{acronym}", method = RequestMethod.GET)
 public ResponseEntity<ClubData> getClub(@PathVariable String acronym) {
   ClubData club = clubService.getClub(acronym);
   return new ResponseEntity<>(club, HttpStatus.OK);
 }
コード例 #3
0
 @RequestMapping(method = RequestMethod.PUT)
 public ResponseEntity updateClub(@Valid @RequestBody ClubData clubData) {
   clubService.updateClub(clubData);
   return new ResponseEntity(HttpStatus.OK);
 }