Annotation Interface AutoConfiguration


Indicates that a class provides configuration that can be automatically applied by Framework Unify. Auto-configuration classes are regular @Configuration with the exception that Configuration#proxyBeanMethods() proxyBeanMethods is always false.

They are located using ImportCandidates and the TodayStrategies mechanism (keyed against EnableAutoConfiguration).

Generally auto-configuration classes are marked as @Conditional (most often using @ConditionalOnClass and @ConditionalOnMissingBean annotations).

从以下版本开始:
4.0 2022/3/5 22:44
作者:
Moritz Halbritter, Harry Yang
另请参阅:
  • 可选元素概要

    可选元素
    修饰符和类型
    可选元素
    说明
    Class<?>[]
    The auto-configure classes that should have already been applied.
    The names of the auto-configure classes that should have already been applied.
    Class<?>[]
    The auto-configure classes that should have not yet been applied.
    The names of the auto-configure classes that should have not yet been applied.
    Explicitly specify the name of the Framework bean definition associated with the @AutoConfiguration class.
  • 元素详细资料

    • value

      @AliasFor(annotation=Configuration.class) String value
      Explicitly specify the name of the Framework bean definition associated with the @AutoConfiguration class. If left unspecified (the common case), a bean name will be automatically generated.

      The custom name applies only if the @AutoConfiguration class is picked up via component scanning or supplied directly to an AnnotationConfigApplicationContext. If the @AutoConfiguration class is registered as a traditional XML bean definition, the name/id of the bean element will take precedence.

      返回:
      the explicit component name, if any (or empty String otherwise)
      另请参阅:
      默认值:
      ""
    • before

      @AliasFor(annotation=AutoConfigureBefore.class, attribute="value") Class<?>[] before
      The auto-configure classes that should have not yet been applied.
      返回:
      the classes
      默认值:
      {}
    • beforeName

      @AliasFor(annotation=AutoConfigureBefore.class, attribute="name") String[] beforeName
      The names of the auto-configure classes that should have not yet been applied.
      返回:
      the class names
      默认值:
      {}
    • after

      @AliasFor(annotation=AutoConfigureAfter.class, attribute="value") Class<?>[] after
      The auto-configure classes that should have already been applied.
      返回:
      the classes
      默认值:
      {}
    • afterName

      @AliasFor(annotation=AutoConfigureAfter.class, attribute="name") String[] afterName
      The names of the auto-configure classes that should have already been applied.
      返回:
      the class names
      默认值:
      {}