What to replace MethodInvokingTimerTaskFactoryBean with Spring 4?

I saw another question about this, but there seemed to be no right answer or explanation.

I recently upgraded to Spring 4 and had some problems with the concurrency package. Forgive my ignorance, but from what I see, ScheduledTimerTaskand TimerFactoryBeancan be easily replaced by ScheduledExecutorTaskand ScheduledExecutorFactoryBean, however, I do not see anything that easily replaces MethodInvokingTimerTaskFactoryBean.

+4
source share
1 answer

It is solved by the above. I first filed a MethodInvokingRunnable in a ScheduledExecutorTask, then I realized that M.Deinum is completely right, and I just have to use the task namespace to schedule my methods. Thank:)

0

Source: https://habr.com/ru/post/1570902/


All Articles