Annotation Interface MissingBean
Context will create a bean definition when current context were missing
- 从以下版本开始:
- 2019-01-31 14:36
- 作者:
- Harry Yang
-
可选元素概要
可选元素修饰符和类型可选元素说明Class<? extends Annotation>[]The annotation type decorating a bean that should be checked.Class<?>[]The class types of beans that should be ignored when identifying matching beans.String[]The class type names of beans that should be ignored when identifying matching beans.String[]Missing bean nameClass<?>[]Additional classes that may contain the specified bean types within their generic parameters.Strategy to decide if the application context hierarchy (parent contexts) should be considered.String[]The class type names of beans that should be checked.Class<?>[]The class types of beans that should be checked.
-
元素详细资料
-
value
The class types of beans that should be checked. The condition matches when no bean of each class specified is contained in theBeanFactory.- 返回:
- the class types of beans to check
- 默认值:
- {}
-
name
Missing bean namethis attr determine the bean definition
when its declare on a method default bean name is method-name
- 默认值:
- {}
-
type
The class type names of beans that should be checked. The condition matches when no bean of each class specified is contained in theBeanFactory.- 返回:
- the class type names of beans to check
- 默认值:
- {}
-
ignored
The class types of beans that should be ignored when identifying matching beans.- 返回:
- the class types of beans to ignore
- 默认值:
- {}
-
ignoredType
The class type names of beans that should be ignored when identifying matching beans.- 返回:
- the class type names of beans to ignore
- 默认值:
- {}
-
annotation
@AliasFor(annotation=ConditionalOnMissingBean.class, attribute="annotation") Class<? extends Annotation>[] annotationThe annotation type decorating a bean that should be checked. The condition matches when each annotation specified is missing from all beans in theBeanFactory.- 返回:
- the class-level annotation types to check
- 默认值:
- {}
-
search
Strategy to decide if the application context hierarchy (parent contexts) should be considered.- 返回:
- the search strategy
- 默认值:
- ALL
-
parameterizedContainer
@AliasFor(annotation=ConditionalOnMissingBean.class, attribute="parameterizedContainer") Class<?>[] parameterizedContainerAdditional classes that may contain the specified bean types within their generic parameters. For example, an annotation declaringvalue=Name.classandparameterizedContainer=NameRegistration.classwould detect bothNameandNameRegistration<Name>.- 返回:
- the container types
- 默认值:
- {}
-