0
我在配置文件中定义的各种调度如下:如何在弹簧MVC控制器中调度方法?
<task:executor id="xxxxxExecutor" pool-size="${async.executor.pool.size}"/>
<task:scheduler id="xxxxwwwScheduler" pool-size="1" />
<task:scheduler id="qqqqSchedular" pool-size="1" />
<task:scheduler id="lastScheduler" pool-size="1" />
我的控制器已经通过注解@Controller被注释。如何在Spring中的@Scheduled
注释中指定特定的Scheduler
?
p.s.我正在尝试使用@Scheduled
注释在控制器中安排一种方法。
为什么你需要安排在控制器中?为什么你需要在你的web层中的处理方法?您不能在注释中指定特定的调度程序,在'task:annotation-driven'上指定的调度程序是始终使用的调度程序。 –