Closed
Description
When a context is pre-processed at build-time and we generate optimized code for it, bean definition registration is one obvious part but not the only one. The core container should have an abstraction and an API that other components can implement to contribute to the setup of the context.
One example is the thing that scans for @EventListener
-annotated methods and register an event-listener if necessary. As these components are actually replacing something else, they could opt-in for excluding bean definitions that they are replacing.