Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track bean dependencies for calls between @Bean methods within @Configuration classes [SPR-15069] #19635

spring-issuemaster opened this issue Dec 29, 2016 · 0 comments


Copy link

commented Dec 29, 2016

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 in SchedulerAnnotationBeanPostProcessor, 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 the resolveNamedBean method in 4.3.3, as well as with the deterministic @Bean registration goal in #19074 (also for 4.3.6).

Issue Links:

  • #12206 findDefaultEntityManagerFactory should consider EMF bean's primary flag
  • #19074 Deterministic and JVM-independent @Bean registration order within Class-reflected configuration classes
  • #19633 SchedulingConfigurer's ScheduledTaskRegistrar should reliably shut down before TaskScheduler
  • #19979 Functional bean dependencies tracking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.