@@ -3039,7 +3039,7 @@ constructor or setter argument or autowired field) as `ObjectFactory<MyTargetBea
30393039allowing for a `getObject()` call to retrieve the current instance on demand every
30403040time it is needed -- without holding on to the instance or storing it separately.
30413041
3042- As an extended variant, you may declare `ObjectProvider<MyTargetBean>`, which delivers
3042+ As an extended variant, you may declare `ObjectProvider<MyTargetBean>` which delivers
30433043several additional access variants, including `getIfAvailable` and `getIfUnique`.
30443044
30453045The 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
66756675the `@Qualifier` annotation. Other method-level annotations that can be specified are
66766676`@Scope`, `@Lazy`, and custom qualifier annotations.
66776677
6678- TIP: In addition to its role for component initialization, you can also place the `@Lazy` annotation
6679- on injection points marked with `@Autowired` or `@Inject`. In this context, it
6680- leads to the injection of a lazy-resolution proxy.
6678+ TIP: In addition to its role for component initialization, you can also place the `@Lazy`
6679+ annotation on injection points marked with `@Autowired` or `@Inject`. In this context,
6680+ it leads to the injection of a lazy-resolution proxy. However, such a proxy approach
6681+ is rather limited. For sophisticated lazy interactions, in particular in combination
6682+ with optional dependencies, we recommend `ObjectProvider<MyTargetBean>` instead.
66816683
66826684Autowired fields and methods are supported, as previously discussed, with additional
66836685support for autowiring of `@Bean` methods. The following example shows how to do so:
0 commit comments