Spring--Spring framework 5.0 注解大全

spring-core

@NonNullApi:

@Nullable:

@NonNullFields:

@UsesSunMisc:

@NonNull:

@AliasFor:

  • value
  • attribute
  • annotation

@Order:

  • value:

@UsesSunHttpServer

@UsesJava7

@UsesJava8

spring-beans

@Autowired:

  • required

@Required:

@Lookup:

  • value

@Qualifier:

  • value

@Configurable:

  • value
  • autowire
  • dependencyCheck
  • preConstruction

@Value:

  • value

spring-context

@ManagedAttribute:

  • defaultValue
  • description
  • currencyTimeLimit
  • persistPolicy
  • persistPeriod

@ManagedNotifications:

  • value

@ManagedOperationParameter:

  • name
  • description

@ManagedMetric:

  • category
  • currencyTimeLimit
  • description
  • displayName
  • metricType
  • persistPeriod
  • persistPolicy
  • unit

@ManagedOperation:

  • description
  • currencyTimeLimit

@ManagedOperationParameters:

  • value

@ManagedResource:

  • value
  • objectName
  • description
  • currencyTimeLimit
  • log
  • logFile
  • persistPolicy
  • persistPeriod
  • persistName
  • persistLocation

@ManagedNotification:

  • name
  • description
  • notificationTypes

@ComponentScans:

  • value

@Bean:

  • value
  • name
  • autowire
  • autowireCandidate
  • initMethod
  • destroyMethod

@Scope:

  • value
  • scopeName
  • proxyMode

@Description:

  • value

@Scheduled:

  • cron
  • zone
  • fixedDelay
  • fixedDelayString
  • fixedRate
  • fixedRateString
  • initialDelay
  • initialDelayString

@Lazy:

  • value

@EnableCaching:

  • proxyTargetClass
  • mode
  • order

@CacheEvict:

  • value
  • cacheNames
  • key
  • keyGenerator
  • cacheManager
  • cacheResolver
  • condition
  • allEntries
  • beforeInvocation

@CachePut:

  • value
  • cacheNames
  • key
  • keyGenerator
  • cacheManager
  • cacheResolver
  • condition
  • unless

@Cacheable:

  • value
  • cacheNames
  • key
  • keyGenerator
  • cacheManager
  • cacheResolver
  • condition
  • unless
  • sync

@Caching:

  • cacheable
  • put
  • evict

@CacheConfig:

  • cacheNames
  • keyGenerator
  • cacheManager
  • cacheResolver

@DateTimeFormat:

  • style
  • iso
  • pattern

@NumberFormat:

  • style
  • pattern

@EventListener:

  • value
  • classes
  • condition

@Primary:

@DependsOn:

  • value

@EnableLoadTimeWeaving:

  • aspectjWeaving

@PropertySource:

  • name
  • value
  • ignoreResourceNotFound
  • encoding
  • factory

@Configuration:

  • value
  • proxyBeanMethods

@Role:

  • value

@Conditional:

  • value

@EnableAsync:

  • annotation
  • proxyTargetClass
  • mode
  • order

@Schedules:

  • value

@EnableMBeanExport:

  • defaultDomain
  • server
  • registration

@PropertySources:

  • value

@Async:

  • value

@EnableAspectJAutoProxy:

  • proxyTargetClass
  • exposeProxy

@Profile:

  • value

@Import:

  • value

@ComponentScan:

  • value
  • basePackages
  • basePackageClasses
  • nameGenerator
  • scopeResolver
  • scopedProxy
  • resourcePattern
  • useDefaultFilters
  • includeFilters
  • excludeFilters
  • lazyInit

@Filter:

  • type
  • value
  • classes
  • pattern

@EnableScheduling:

@ImportResource:

  • value
  • locations
  • reader

@Validated:

  • value

@Service:

  • value

@Indexed:

@Repository:

  • value

@Controller:

  • value

@Component:

  • value

spring-context-indexer

spring-context-support

spring-expression

spring-aop

spring-aspects

@EnableSpringConfigured

spring-instrument

spring-messaging

@Header:

  • value
  • name
  • required
  • defaultValue

@MessageMapping:

  • value

@Payload:

  • value
  • expression
  • required

@MessageExceptionHandler:

  • value

@Headers:

@SubscribeMapping:

  • value

@ConnectMapping:

  • value

@SendToUser:

  • value
  • destinations
  • broadcast

@DestinationVariable:

  • value

@SendTo:

  • value

spring-jdbc

spring-orm

spring-oxm

spring-jms

@EnableJms:

@JmsListener:

  • id
  • containerFactory
  • destination
  • subscription
  • selector
  • concurrency

@JmsListeners:

  • value

spring-tx

@Transactional:

  • value
  • transactionManager
  • propagation
  • isolation
  • timeout
  • readOnly
  • rollbackFor
  • rollbackForClassName
  • noRollbackFor
  • noRollbackForClassName

@TransactionalEventListener:

  • phase
  • fallbackExecution
  • value
  • classes
  • condition

@EnableTransactionManagement:

  • proxytargetClass
  • mode
  • order

spring-web

@RestController:

  • value

@RequestMapping:

  • name
  • value
  • path
  • method
  • params
  • headers
  • consumes
  • produces

@GetMapping:

  • name
  • value
  • path
  • params
  • headers
  • consumes
  • produces

@PostMapping:

  • name
  • value
  • path
  • params
  • headers
  • consumes
  • produces

@PatchMapping:

  • name
  • value
  • path
  • params
  • headers
  • consumes
  • produces

@DeleteMapping:

  • name
  • value
  • path
  • params
  • headers
  • consumes
  • produces

@PutMapping:

  • name
  • value
  • path
  • params
  • headers
  • consumes
  • produces

@Mapping:

@RequestParam:

  • value
  • name
  • required
  • defaultValue

@RequestBody:

  • required

@ResponseBody:

@ResponseStatus:

  • value
  • code
  • reason

@ExceptionHandler:

  • value

@RequestHander:

  • value
  • name
  • required
  • defaultValue

@RestControllerAdvice:

  • value
  • basePackages
  • basePackageClasses
  • assignableTypes
  • annotations

@ControllerAdvice:

  • value
  • basePackages
  • basePackageClasses
  • assignableTypes
  • annotations

@SessionScope:

  • proxyMode

@RequestScope:

  • proxyMode

@ApplicationScope:

  • proxyMode

@ModelAttribute:

  • value
  • name
  • binding

@SessionAttributes:

  • value
  • names
  • types

@SessionAttribute:

  • value
  • name
  • required

@RequestAttribute:

  • value
  • name
  • required

@RequestPart:

  • value
  • name
  • required

@PathVariable:

  • value
  • name
  • required

@MatrixVariable:

  • value
  • name
  • pathVar
  • required
  • defaultValue

@CookieValue:

  • value
  • name
  • required
  • defaultValue

@InitBinder:

  • value

@CrossOrigin:

  • value
  • origins
  • allowedHeaders
  • exposedHeaders
  • methods
  • allowCredentials
  • maxAge

spring-webmvc

@EnableWebMvc:

spring-websocket

@EnableWebSocketMessageBroker:

@EnableWebSocket:

spring-webflux

@EnableWebFlux:

spring-jcl

spring-test

@TestConstructor:

  • autowireMode

@BootstrapWith:

  • value

@ContextConfiguration:

  • value
  • locations
  • classes
  • initializers
  • inheritLocations
  • inheritInitializers
  • loader
  • name

@TestExecutionListeners:

  • value
  • listeners
  • inheritListeners
  • mergeMode

@TestPropertySource:

  • value
  • locations
  • inheritLocations
  • properties
  • inheritProperties

@SpringJUnitConfig:

  • value
  • classes
  • locations
  • initializers
  • inheritLocations
  • inheritInitializers
  • name

@WebAppConfiguration:

  • value

@EnabledIf:

  • value
  • expression
  • reason
  • loadContext

@DisabledIf:

  • value
  • expression
  • reason
  • loadContext

@SpringJUnitWebConfig:

  • value
  • classes
  • locations
  • initializers
  • inheritLocations
  • inheritInitializers
  • name
  • resourcePath

@SqlMergeMode:

  • value

@SqlGroup:

  • value

@Sql:

  • value
  • scripts
  • statements
  • executionPhase
  • config

@SqlConfig:

  • dataSource
  • transactionManager
  • transactionMode
  • encoding
  • separator
  • commentPrefix
  • commentPrefixes
  • blockCommentStartDelimiter
  • blockCommentEndDelimiter
  • errorMode

@AfterTransaction:

@BeforeTransaction:

@TestPropertySources:

  • value

@BeforeTestMethod:

  • value

@BeforeTestExecution:

  • value

@DirtiesContext:

  • methodMode
  • classMode
  • hierarchyMode

@AfterTestClass:

  • value

@Timed:

  • millis

@Commit:

@ActiveProfiles:

  • value
  • profiles
  • resolver
  • inheritProfiles

@PrepareTestInstance:

  • value

@AfterTestMethod:

  • value

@ProfileValueSourceConfiguration:

  • value

@BeforeTestClass:

  • value

@IfProfileValue:

  • name
  • value
  • values

@AfterTestExecution:

  • value

@Repeat:

  • value

@ContextHierarchy:

  • value

@Rollback:

  • value
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值