-
-
Save podisto/c25425e808b9bcacafc84df9e810d8d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Spring to JAX-RS Cheat Sheet | |
| This is not an exhaustive list, but it does include the most common annotations. | |
| Spring Annotation JAX-RS Annotation | |
| @RequestMapping(path = "/troopers" @Path("/troopers") | |
| @RequestMapping(method = RequestMethod.POST) @POST | |
| @RequestMapping(method = RequestMethod.GET) @GET | |
| @RequestMapping(method = RequestMethod.DELETE) @DELETE | |
| @ResponseBody N/A | |
| @RequestBody N/A | |
| @PathVariable("id") @PathParam("id") | |
| @RequestParam("xyz") @QueryParam('xyz") | |
| @RequestParam(value="xyz" @FormParam(“xyz”) | |
| @RequestMapping(produces = {"application/json"}) @Produces("application/json") | |
| @RequestMapping(consumes = {"application/json"}) @Consumes("application/json") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment