Skip to content

Instantly share code, notes, and snippets.

@SriMaddy
Last active March 23, 2016 07:24
Show Gist options
  • Save SriMaddy/8b1c74f595a4ab6ff8ad to your computer and use it in GitHub Desktop.
Save SriMaddy/8b1c74f595a4ab6ff8ad to your computer and use it in GitHub Desktop.
-> HTTP request are handled by controller.
-> @RestController over class
-> @RequestMapping("/path", METHOD=GET/POST....) over method
-> @RequestParam(value="name", defaultValue="Some Default Values") : these are query string params in url/ by default its set to required = false
-> java.util.concurrent.atomic.AtmoicLong is counter which returns specified Rest Object
-> Now converting object to JSON by MappingJackson2HttpConverter which is inside spring's Jackson2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment