Generated by
JDiff

org.springframework.beans.factory.annotation Documentation Differences

This file contains all the changes in documentation in the package org.springframework.beans.factory.annotation as colored differences. Deletions are shown like this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.

Class Autowired

Marks a constructor, field, setter method or config method as to be autowired by Spring's dependency injection facilities.

Only one constructor (at max) of any given bean class may carry this annotation, indicating the constructor to autowire when used as a Spring bean. Such a 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.

In the case of multiple argument methods, the 'required' parameter is is applicable for all arguments.

In case of a java.util.Collection or java.util.Map dependency type, the container will autowire all beans matching the declared value type. In case of a Map, the keys must be declared as type String and will be resolved to the corresponding bean names.

Note that actual injection is performed through a BeanPostProcessor which in turn means that you cannot use {@code @Autowired} to inject references into BeanPostProcessor or or BeanFactoryPostProcessor types. Please Please consult the javadoc for the AutowiredAnnotationBeanPostProcessor class (which, by default, checks for the presence of this annotation). @author Juergen Hoeller @author Mark Fisher @since 2.5 @see AutowiredAnnotationBeanPostProcessor @see Qualifier @see Value


Class Value

Annotation at the field or method/constructor parameter level that indicates a default value expression for the affected argument.

Typically used for expression-driven dependency injection. Also supported for dynamic resolution of handler method parameters, e.g. in Spring MVC.

A common use case is to assign default field values using "#{systemProperties.myProp}" style expressions.

Note that actual processing of the {@code @Value} annotation is performed by a BeanPostProcessor which in turn means that you cannot use {@code @Value} within BeanPostProcessor or or BeanFactoryPostProcessor types. Please Please consult the javadoc for the AutowiredAnnotationBeanPostProcessor class (which, by default, checks for the presence of this annotation). @author Juergen Hoeller @since 3.0 @see AutowiredAnnotationBeanPostProcessor @see Autowired @see org.springframework.beans.factory.config.BeanExpressionResolver @see org.springframework.beans.factory.support.AutowireCandidateResolver#getSuggestedValue