一:注解整理方式:
注解整理方式采用思维导图工具(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
四:如有内容不合理或者错误,请大家多有回复指点,我再不断的修正进去!谢谢大家!共同学习!