http annotations in spring
Two types of mapping/routing or HTTP annotations in Java Spring
1) Mapping/Routes using @RequestMapping
---------------------------------------
@RequestMapping(value = "/ex/foos/{id}", headers = "key=val", produces = "application/json",
params = { "id", "second" }, method = RequestMethod.GET)
@RequestMapping(value = "/ex/foos/{id}", headers = { "key1=val1", "key2=val2" })
// In @RequestMapping get method just use value i.e method aurgument is optional.
// Eg: @RequestMapping(/getEmployees)
2) Mapping/Routes using specific mapping (Here nomethod aurgument)
---------------------------------------
@GetMapping
@PostMapping
@PutMapping
@DeleteMapping
@PatchMapping