Skip to content

Latest commit

 

History

History
10 lines (9 loc) · 610 Bytes

README.Annotations.md

File metadata and controls

10 lines (9 loc) · 610 Bytes

Annotation:

Ensure that the annotations are used correctly and on the right elements.

  • @RestController: On a class to indicate that it's a REST controller.
  • @RequestMapping: On a class or method to map HTTP requests.
  • @GetMapping, @PostMapping, @PutMapping, @DeleteMapping: On methods to map specific HTTP methods.
  • @PathVariable: On method parameters to bind URI template variables.
  • @RequestBody: On method parameters to bind request bodies.
  • @Autowired: On fields, constructors, or methods for dependency injection.
  • @ApiOperation, @ApiParam: For Swagger documentation on methods and parameters.