Conditional系列注解

基础

位置:org.springframework.context.annotation

@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Conditional {
    Class[] value();
}

SpringBoot的条件注解

位置:org.springframework.boot.autoconfigure.condition

类目

  • ConditionalOnBean
  • ConditionalOnClass
  • ConditionalOnCloudPlatform
  • ConditionalOnExpression
  • ConditionalOnJava
  • ConditionalOnJndi
  • ConditionalOnMissingBean
  • ConditionalOnMissiongClass
  • ConditionalOnNotWebApplication
  • ConditionalOnProperty
  • ConditionalOnResource
  • ConditionalOnSingleCandidate
  • ConditionalOnWebApplication

你可能感兴趣的:(Conditional系列注解)