spring task注解定时器

时间:2021-11-28 23:28:19

参考网站 http://blog.csdn.net/u010246789/article/details/51910044 

http://blog.csdn.net/sd4000784/article/details/7745947

一,代码注意几个注解

spring task注解定时器

spring task注解定时器

spring task注解定时器

 

spring.xml

一,spring task注解定时器

二,

<task:scheduler id="scheduler" pool-size="10" />
<task:executor id="executor" keep-alive="3600" pool-size="100-200"
queue-capacity="500" rejection-policy="CALLER_RUNS" />
<task:annotation-driven executor="executor" scheduler="scheduler" />

三,注意扫描包

spring task注解定时器