Why does Spring 4 only allow one TaskScheduler in a context?

后端 未结 3 1121
青春惊慌失措
青春惊慌失措 2021-02-04 08:41

We have a Spring web application we\'re porting from Spring 3.2 to Spring 4. Our application has several sub-contexts assembled into a single runtime context when the web appli

3条回答
  •  无人共我
    2021-02-04 08:50

    Just add bean to your config:

     @Bean()
     public ThreadPoolTaskScheduler taskScheduler() {
        return new ThreadPoolTaskScheduler();
     }
    

提交回复
热议问题