以下为SpringBoot入门级别常用注解,务必熟悉其特性及使用场景

1. Spring

IOC

AOP

其他

  • @Transactional

  • @MapperScan

  • @ComponentScan

  • @ControllerAdvice

  • @ExceptionHandler

  • @Target({ElementType.METHOD, ElementType.TYPE})

  • @Retention(RetentionPolicy.RUNTIME)

2. SpringMVC

  • @RequestMapping
  • @RequestParam
  • @PathVariable
  • @RequestBody

3. SpringBoot

  • @SpringBootApplication

  • @RestController

  • @GetMapping

  • @PostMapping

  • @PutMapping

  • @DeleteMapping

  • @ConfigurationProperties