Skip to content

Annotation Used

SunilOS edited this page Mar 12, 2019 · 2 revisions
  1. @SpringBootApplication: defines spring main class
  2. @ComponentScan: defines base package to discover beans and register with IOC container
  3. @Configuration: defines configuration class that defines beans
  4. @RestController: defines a rest controller that exchange JSON
  5. @RequestMapping: maps controller and its methods with urls
  6. @GetMapping: maps HTTP GET method with method of controller
  7. @PostMapping: maps HTTP POST method with method of controller
  8. @Service: defines a service class
  9. @Transactional: makes a method or class transactional
  10. @Repository: defines DAO class
  11. @Autowired: injects dependency

Clone this wiki locally