@Scheduled methods in @Lazy beans are not scheduled [SPR-17587] #22119
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: declined
A suggestion or change that we don't feel we should currently apply
Silvio Assunção Junior opened SPR-17587 and commented
The issue #17470 was not resolved, the problem continue
I checked the code of ScheduledAnnotationBeanPostProcessor and the tasks will registered on method postProcessAfterInitialization, but lazy Beans it is not created or initialized, than Beans with
@Scheduled
and@Lazy
does not work correctlyThe Schedule will be registered only if I will use the Bean (Force a creation)
Other guys with the same problem https://stackoverflow.com/questions/47585846/why-spring-schedule-do-not-work-with-lazy
Affects: 4.3.18
Reference URL: #17470
Issue Links:
@Scheduled
methods in@Lazy
beans are not scheduledThe text was updated successfully, but these errors were encountered: