java.lang.Objectorg.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
All Implemented Interfaces:
PriorityOrdered, BeanFactoryAware, MergedBeanDefinitionPostProcessor, SmartInstantiationAwareBeanPostProcessor
Only one constructor (at max) of any given bean class may carry this
annotation with the 'required' parameter set to true,
indicating the constructor to autowire when used as a Spring bean.
If multiple non-required constructors carry the annotation, they
will be considered as candidates for autowiring. The constructor with
the greatest number of dependencies that can be satisfied by matching
beans in the Spring container will be chosen. If none of the candidates
can be satisfied, then a default constructor (if present) will be used.
An annotated constructor does not have to be public.
Fields are injected right after construction of a bean, before any config methods are invoked. Such a config field does not have to be public.
Config methods may have an arbitrary name and any number of arguments; each of those arguments will be autowired with a matching bean in the Spring container. Bean property setter methods are effectively just a special case of such a general config method. Such config methods do not have to be public.
Note: A default AutowiredAnnotationBeanPostProcessor will be registered by the "context:annotation-config" and "context:component-scan" XML tags. Remove or turn off the default annotation configuration there if you intend to specify a custom AutowiredAnnotationBeanPostProcessor bean definition.
Juergen - HoellerMark - Fisher2.5 - | Field Summary | ||
|---|---|---|
| protected final Log | logger | |
| Method from org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor Summary: |
|---|
| determineCandidateConstructors, determineRequiredStatus, findAutowireCandidates, getAutowiredAnnotationType, getOrder, postProcessAfterInstantiation, postProcessMergedBeanDefinition, postProcessPropertyValues, processInjection, setAutowiredAnnotationType, setBeanFactory, setOrder, setRequiredParameterName, setRequiredParameterValue |
| Methods from org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter: |
|---|
| determineCandidateConstructors, getEarlyBeanReference, postProcessAfterInitialization, postProcessAfterInstantiation, postProcessBeforeInitialization, postProcessBeforeInstantiation, postProcessPropertyValues, predictBeanType |
| Methods from java.lang.Object: |
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor Detail: |
|---|
|
A 'required' dependency means that autowiring should fail when no beans are found. Otherwise, the autowiring process will simply bypass the field or method when no beans are found. |
|
|
|
|
|
|
@Autowired. |
The default autowired annotation type is the Spring-provided Autowired annotation. This setter property exists so that developers can provide their own (non-Spring-specific) annotation type to indicate that a member is supposed to be autowired. |
|
|
|
For example if using 'required=true' (the default),
this value should be |