@@ -522,23 +522,28 @@ allows for singling out specific beans for background initialization, covering t
522
522
entire bean creation step for each such bean on context startup.
523
523
524
524
Dependent beans with non-lazy injection points automatically wait for the bean instance
525
- to be completed. All regular background initializations are forced to complete at the
526
- end of context startup. Only for beans additionally marked as `@Lazy`, the completion
527
- is allowed to happen later (up until first actual access).
525
+ to be completed. All regular background initializations are forced to complete at the end
526
+ of context startup. Only beans additionally marked as `@Lazy` are allowed to be completed
527
+ later (up until the first actual access).
528
528
529
529
Background initialization typically goes together with `@Lazy` (or `ObjectProvider`)
530
530
injection points in dependent beans. Otherwise, the main bootstrap thread is going to
531
531
block when an actual background-initialized bean instance needs to be injected early.
532
532
533
- This form of concurrent startup applies to individual beans: If such a bean depends on
533
+ This form of concurrent startup applies to individual beans: if such a bean depends on
534
534
other beans, they need to have been initialized already, either simply through being
535
- declared earlier or through `@DependsOn` which is enforcing initialization in the main
535
+ declared earlier or through `@DependsOn` which enforces initialization in the main
536
536
bootstrap thread before background initialization for the affected bean is triggered.
537
537
538
- Note that a `bootstrapExecutor` bean of type `Executor` needs to be declared for
539
- background bootstrapping to be actually active. Otherwise, the background markers are
540
- going to be ignored at runtime. The bootstrap executor may be a bounded executor just
541
- for startup purposes or a shared thread pool which serves for other purposes as well.
538
+ [NOTE]
539
+ ====
540
+ A `bootstrapExecutor` bean of type `Executor` must be declared for background
541
+ bootstrapping to be actually active. Otherwise, the background markers will be ignored at
542
+ runtime.
543
+
544
+ The bootstrap executor may be a bounded executor just for startup purposes or a shared
545
+ thread pool which serves for other purposes as well.
546
+ ====
542
547
543
548
544
549
[[beans-java-conditional]]
0 commit comments