Introspecting a type at build-time allows us to detect things that we typically do at runtime:
Executable
to use.- Injection points to honor (typically
@Autowired
). - Property values to inject, as defined on the
BeanDefinition
. - Initialization and destruction callback
Offering an API that uses the same algorithm as a traditional runtime is important to keep the behavior consistent. This enhancement is further refined as follows:
- https://github.com/spring-projects/spring-framework/issues/27920
- https://github.com/spring-projects/spring-framework/issues/27921
Comment From: snicoll
We've refactored things so that creating such a unified context is necessary. Rather, each post processor is free to express that it wants to contribute to the bean instance. This makes for a much more flexible setup.