100 个最常用的Spring Boot注解,建议收藏









几乎把常用的 Spring Boot 注解一网打尽了,强烈建议大家收藏!
@SpringBootApplication
@RestController
@RequestMapping
@GetMapping
@PostMapping
@PutMapping
@DeleteMapping
@RequestParam
@RequestBody
@ResponseBody
@PathVariable
@Autowired
@Value
@Bean
@Scope
@Primary
@Transactional
@EnableAspectJAutoProxy
@Aspect
@Scheduled
@EnableCaching
@Cacheable
@CacheEvict
@CachePut
@Controller
@EnableWebSecurity
@Secured
@PreAuthorize
@RestControllerAdvice
@Test
@MockBean
@SpringBootTest
@DataJpaTest
@WebMvcTest
@Entity
@Id
@GeneratedValue
@Column
@JoinColumn
@ManyToOne
@OneToMany
@ManyToMany
@JoinTable
@MappedSuperclass
@Inheritance
@EnableTransactionManagement
@EnableJpaAuditing
@CreatedDate
@LastModifiedDate
@PrePersist
@PreUpdate
@PostPersist
@PostUpdate
@PreRemove
@PreFlush
@PostRemove
@PostFlush
@PostConstruct
@PreDestroy
@RequestHeader
@CookieValue
@ModelAttribute
@SessionAttributes
@ExceptionHandler
@ResponseStatus
@Around
@Before
@After
@AfterReturning
@AfterThrowing
@EnableScheduling
@Async
#程序员 #Java程序员 #java #java学习 #java面试题 #java面试 #java八股文 #后端开发 #springboot #spring