Why isn't Spring running my @Scheduled method?

前端 未结 8 1679
天涯浪人
天涯浪人 2020-12-29 03:18

I\'m a bit befuddled because I\'m trying use use @Scheduled annotations, but Spring doesn\'t seem to be finding my methods. The end result is that, none of my m

8条回答
  •  一个人的身影
    2020-12-29 03:56

    So...it looks like there's a problem in Spring 3.0.x (at the very least 3.0.4 and 3.0.5) having to do with discovering @Scheduled annotations on AOP proxies. I've got a pointcut declaration wrapping the @Scheduled method with transactional advice, and that seems to be the root of the problem. If I remove the advice, the job runs. If I add it back in, Spring fails to find and create a task for my annotated method.

    So, I'm going to go file a bug with the Spring folks, and in the meantime I'm stuck declaring my tasks manually.

提交回复
热议问题