@@ -5864,12 +5864,12 @@ metadata is provided per-instance rather than per-class.
5864
5864
5865
5865
5866
5866
[[beans-scanning-index]]
5867
- === Generating a index of candidate components
5868
- Rather than scanning the classpath to find components , it is also possible to generate an
5869
- index at compilation time. When the `ApplicationContext` detects such index it will
5870
- automatically use it rather than scanning the classpath. This can reduce the time required
5871
- to refresh the `ApplicationContext` as scanning large applications can take a significant
5872
- amount of time .
5867
+ === Generating an index of candidate components
5868
+ While classpath scanning is very fast , it is possible to improve the startup performance
5869
+ of large applications by creating a static list of candidates at compilation time. In this
5870
+ mode, _all modules_ of the application must use this mechanism as, when the
5871
+ `ApplicationContext` detects such index, it will automatically use it rather than scanning
5872
+ the classpath .
5873
5873
5874
5874
To generate the index, simply add an additional dependency to each module that contains
5875
5875
components that are target for component scan directives:
@@ -5900,6 +5900,13 @@ Or, using Gradle:
5900
5900
That process will generate a `META-INF/spring.components` file that is going to be
5901
5901
included in the jar.
5902
5902
5903
+ [NOTE]
5904
+ ====
5905
+ When working with this mode in your IDE, the `spring-context-indexer` must be registered
5906
+ as an annotation processor to make sure the index is up to date when candidate components
5907
+ are updated.
5908
+ ====
5909
+
5903
5910
[TIP]
5904
5911
====
5905
5912
The index is enabled automatically when a `META-INF/spring.components` is found on the
0 commit comments