Track bean dependencies for calls between @Bean methods within @Configuration classes [SPR-15069] #19635
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Juergen Hoeller opened SPR-15069 and commented
Following up on #19633 which turned out to be a lack of bean dependency tracking for the
TaskScheduler
lookup inSchedulerAnnotationBeanPostProcessor
, it turns out that we're not tracking bean dependencies for calls to other@Bean
methods within a@Configuration
class at all. Since such calls are symbolic bean references, they should have a dependent-bean relationship tracked like any other form of injection does already, allowing to shut them down in proper order. This is also nicely in line with the changes behind #12206 which introduced theresolveNamedBean
method in 4.3.3, as well as with the deterministic@Bean
registration goal in #19074 (also for 4.3.6).Issue Links:
@Bean
registration order within Class-reflected configuration classesThe text was updated successfully, but these errors were encountered: