In a few words, with the simplest possible configuration, when Spring detects @EnableScheduling
annotation it creates a new ScheduledAnnotationBeanPostProcessor
which is able to process the @Scheduled
annotations. After finding the @Scheduled
annotations using reflection, it will read their configuration and then it will register them in order to be invoked by TaskScheduler
. A ScheduledTaskRegistrar
is used to help submit task to the ScheduledThreadPoolExecutor
.
As you can see, no proxy is being created.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…