Spring常用注解

组件注解相关

自定义配置,读取配置文件相关

  • @Configuration
  • @EnableAutoConfiguration
  • @Bean
  • @Configurationproperties
  • @EnableConfigurationProperties
  • @Value

请求拦截和请求参数获取相关

  • @RequestMapping
  • @RequestParam
  • @PathVariable
  • @RequestBody
  • @RequestHeader
  • @CookieValue
  • @SessionAttributes

Mybatis扫描Mapper文件

  • @MapperScan

类加载条件相关

  • @Conditional*系列

异步处理

  • @Async
  • @EnableAsync

事务

  • @Transactional

Quartz定时器

  • @Schedule
  • @DisallowConcurrentExecution

评论

暂无评论