コード例 #1
0
 @POST
 @Path("/save")
 @Consumes(MediaType.APPLICATION_JSON)
 public void saveBook(Book book) {
   System.out.println("saveBook titel=" + book.getTitle());
   bookService.saveBook(book);
 }
コード例 #2
0
 @PUT
 @Path("/update")
 @Consumes(MediaType.APPLICATION_JSON)
 public void updateBook(Book book) {
   System.out.println("updateBook bookId=" + book.getId());
   bookService.updateBook(book);
 }