Annotation Interface AutoConfiguration
@Configuration with the exception that
proxyBeanMethods is always false. They
are located using ImportCandidates.
Generally, auto-configuration classes are top-level classes that are marked as
@Conditional (most often using
@ConditionalOnClass and
@ConditionalOnMissingBean annotations).
- Since:
- 2.7.0
- Author:
- Moritz Halbritter
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<?>[]The auto-configuration classes that should have already been applied.String[]The names of the auto-configuration classes that should have already been applied.Class<?>[]The auto-configuration classes that should have not yet been applied.String[]The names of the auto-configuration classes that should have not yet been applied.Explicitly specify the name of the Spring bean definition associated with the@AutoConfigurationclass.
-
Element Details
-
value
Explicitly specify the name of the Spring bean definition associated with the@AutoConfigurationclass. If left unspecified (the common case), a bean name will be automatically generated.The custom name applies only if the
@AutoConfigurationclass is picked up through component scanning or supplied directly to anAnnotationConfigApplicationContext. If the@AutoConfigurationclass is registered as a traditional XML bean definition, the name/id of the bean element will take precedence.- Returns:
- the explicit component name, if any (or empty String otherwise)
- See Also:
- Default:
""
-
before
The auto-configuration classes that should have not yet been applied.Since this annotation is parsed by loading class bytecode, it is safe to specify classes here that may ultimately not be on the classpath, but only if this annotation is directly on the affected component and not if this annotation is used as a composed, meta-annotation. In order to use this annotation as a meta-annotation, only use the
beforeName()attribute.- Returns:
- the classes
- Default:
{}
-
beforeName
The names of the auto-configuration classes that should have not yet been applied. In the unusual case that an auto-configuration class is not a top-level class, its name should use$to separate it from its containing class, for examplecom.example.Outer$NestedAutoConfiguration.- Returns:
- the class names
- Default:
{}
-
after
The auto-configuration classes that should have already been applied.Since this annotation is parsed by loading class bytecode, it is safe to specify classes here that may ultimately not be on the classpath, but only if this annotation is directly on the affected component and not if this annotation is used as a composed, meta-annotation. In order to use this annotation as a meta-annotation, only use the
afterName()attribute.- Returns:
- the classes
- Default:
{}
-
afterName
The names of the auto-configuration classes that should have already been applied. In the unusual case that an auto-configuration class is not a top-level class, its class name should use$to separate it from its containing class, for examplecom.example.Outer$NestedAutoConfiguration.- Returns:
- the class names
- Default:
{}
-