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.