找不到默认的TaskScheduler bean - " scheduling.annotation.ScheduledAnnotationBeanPostProcessor"

时间:2016-06-21 16:31:48

标签: java spring tomcat8 spring-tool-suite

我试图在Spring工具套件(sts)3.6版本的spring 4配置中使用tomcat 8.0.36。服务器启动成功,但启动时错误丢失。

DEBUG(localhost-startStop-1)[scheduling.annotation.ScheduledAnnotationBeanPostProcessor]无法找到默认的TaskScheduler bean org.springframework.beans.factory.NoSuchBeanDefinitionException:没有定义[org.springframework.scheduling.TaskScheduler]类型的限定bean     在org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:372)     在org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:369)     在org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:332)     在org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.finishRegistration(ScheduledAnnotationBeanPostProcessor.java:192)     at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.onApplicationEvent(ScheduledAnnotationBeanPostProcessor.java:171)     at org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.onApplicationEvent(ScheduledAnnotationBeanPostProcessor.java:86)     在org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:163)     在org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:136)

DEBUG(localhost-startStop-1)[scheduling.annotation.ScheduledAnnotationBeanPostProcessor]找不到默认的ScheduledExecutorService bean org.springframework.beans.factory.NoSuchBeanDefinitionException:没有定义[org.springframework.scheduling.TaskScheduler]类型的限定bean     在org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:372)

有人可以解决这个问题吗?感谢

0 个答案:

没有答案