@ -471,7 +471,7 @@ public class AutowiredAnnotationBeanPostProcessor implements SmartInstantiationA
@@ -471,7 +471,7 @@ public class AutowiredAnnotationBeanPostProcessor implements SmartInstantiationA
@ -315,7 +315,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
@@ -315,7 +315,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
// Quick check on the concurrent map first, with minimal locking.
@ -335,7 +335,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
@@ -335,7 +335,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
@ -3039,7 +3039,7 @@ constructor or setter argument or autowired field) as `ObjectFactory<MyTargetBea
@@ -3039,7 +3039,7 @@ constructor or setter argument or autowired field) as `ObjectFactory<MyTargetBea
allowing for a `getObject()` call to retrieve the current instance on demand every
time it is needed -- without holding on to the instance or storing it separately.
As an extended variant, you may declare `ObjectProvider<MyTargetBean>`, which delivers
As an extended variant, you may declare `ObjectProvider<MyTargetBean>` which delivers
several additional access variants, including `getIfAvailable` and `getIfUnique`.
The JSR-330 variant of this is called `Provider` and is used with a `Provider<MyTargetBean>`
@ -6675,9 +6675,11 @@ factory method and other bean definition properties, such as a qualifier value t
@@ -6675,9 +6675,11 @@ factory method and other bean definition properties, such as a qualifier value t
the `@Qualifier` annotation. Other method-level annotations that can be specified are
`@Scope`, `@Lazy`, and custom qualifier annotations.
TIP: In addition to its role for component initialization, you can also place the `@Lazy` annotation
on injection points marked with `@Autowired` or `@Inject`. In this context, it
leads to the injection of a lazy-resolution proxy.
TIP: In addition to its role for component initialization, you can also place the `@Lazy`
annotation on injection points marked with `@Autowired` or `@Inject`. In this context,
it leads to the injection of a lazy-resolution proxy. However, such a proxy approach
is rather limited. For sophisticated lazy interactions, in particular in combination
with optional dependencies, we recommend `ObjectProvider<MyTargetBean>` instead.
Autowired fields and methods are supported, as previously discussed, with additional
support for autowiring of `@Bean` methods. The following example shows how to do so: