We want Spring AOT to be able to replace runtime classpath scanning by an already-prepared index. This is similar to what the component indexer meant to be achieved, but at the application level.
To help with that, we need two new hook points on ClassPathScanningCandidateComponentProvider
:
- A way to mark interest in what an instance does. That could be a callback whenever scanning occurs (and the outcome) for instance. This is used by Spring AOT to record and then make the index available
- A way to configure
ClassPathScanningCandidateComponentProvider
so that it uses an index, rather than doing the scanning at runtime.