Skip to content

Commit 193424c

Browse files
committed
Polish "Background Initialization" documentation
1 parent c76d681 commit 193424c

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

framework-docs/modules/ROOT/pages/core/beans/java/composing-configuration-classes.adoc

+14-9
Original file line numberDiff line numberDiff line change
@@ -522,23 +522,28 @@ allows for singling out specific beans for background initialization, covering t
522522
entire bean creation step for each such bean on context startup.
523523

524524
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).
528528

529529
Background initialization typically goes together with `@Lazy` (or `ObjectProvider`)
530530
injection points in dependent beans. Otherwise, the main bootstrap thread is going to
531531
block when an actual background-initialized bean instance needs to be injected early.
532532

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
534534
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
536536
bootstrap thread before background initialization for the affected bean is triggered.
537537

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+
====
542547

543548

544549
[[beans-java-conditional]]

0 commit comments

Comments
 (0)