Spring 注解大全(自己分类方式)

一:注解整理方式:

注解整理方式采用思维导图工具(XMind)整理,对注解按自己的方式进行了分类,并对所有的注解在备注中进行了解释说明;

 二:整理的注解列表:

Spring 注解
    SpringBoot相关注解
        @SpringBootApplication
        @EnableAutoConfiguration
        @SpringBootConfiguration  
    请求相关注解
        @Controller
        @ResponseBody
        @RestController
        @RequestMapping、@GetMapping、@PostMapping、@PutMapping、@DeleteMapping、@PatchMapping
        @RequestParam
        @PathVariable
        @ResponseStatus
        @CookieValue
        @ModelAttribute
        @CrossOrigin
        @EnableWebMvc
    Bean相关注解
        @ComponentScan
        @Service
        @Repository
        @Component
        @Autowired
        @Resource
        @Qualifier
        @Inject
        @Bean
        @DependsOn
        @Primary
        @Data
        @Setter和@Getter
        @NoArgsConstructor、@RequiredArgsConstructor、@AllArgsConstructor
        @EqualsAndHashCode
        @toString
        @NonNull
        @val
        @Scope
    配置文件注解
        @EnableConfigurationProperties
        @Configuration
        @Value
        @ConfigurationProperties
        @AutoConfigureBefore、@AutoConfigureAfter、@AutoConfigureOrder
        @ContextConfiguration
        @Import
        @ImportResource
        @Required
        @PropertySource
    JSON转化相关注解
        @JsonIgnoreProperties
        @JsonIgnore
        @JsonFormat
        @JsonSerialize
        @JsonDeserialize
        @JsonProperty
    Mybatis相关注解
        @Mapper
        @MapperScan
        @Param
        @Insert、@Select、@Update、@Delete
        @Results
        @Result
        @One
        @Many
        动态SQL
    AOP相关注解
        @EnableAspectJAutoProxy
        @Aspect
        @PointCut
        @Before、@Around、@After
        @AfterReturning
        @AfterThrowing
    缓存相关注解
        @EnableCaching
        @SessionAttributes
        @Cacheable
        @CacheEvict
    事务相关注解
        @EnableTransactionManagement 
        @Transactional
    Bean的生命周期注解
        @PostConstruct
        @PreDestory
    异步相关注解
        @EnableAsync
        @Async
    任务相关注解
        @EnableScheduling
        @EnableScheduling
        @Scheduled
    条件配置注解
        @Conditional
        @ConditionalOnBean、@ConditionalOnMissingBean
        @ConditionalOnClass、@ConditionalOnMissingClass
        @ConditionalOnWebApplication、@ConditionalOnNotWebApplication
        @ConditionalOnSingleCandidate
        @ConditionalOnExpression
        @ConditionalOnProperty 
        @ConditionalOnResource
        @ConditionalOnJndi 
        @ConditionalOnJava
    JPA相关注解
        @EnableJpaRepositories
        @Entity
        @Table
        @Id
        @GeneratedValue
        @Column
        @ColumnComment
        @Transient
        @Temporal
        @Enumerated
        @Embedded、@Embeddable
        @ElementCollection
        @CreatedDate、@CreatedBy、@LastModifiedDate、@LastModifiedBy
        @MappedSuperClass
        @NoRepositoryBean
        @SequenceGeneretor
        @JoinColumn
        @OneToOne、@OneToMany、@ManyToOne
        @PostLoad
        @PrePersist和@PostPersist
        @PreUpdate和@PostUpdate
        @PreRemove和@PostRemove
        @EnableJpaAuditing
    元注解
        @Target
        @Retention
        @Documented
        @Inherited
    日志相关注解
        @Log4j
        @Log4j2
    全局异常处理注解
        @ControllerAdvice
        @ExceptionHandler

三:内容下载地址

https://download.csdn.net/download/tianya900519/11340374

四:如有内容不合理或者错误,请大家多有回复指点,我再不断的修正进去!谢谢大家!共同学习!

  • 3
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

kung900519

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值