spring task注解定时器

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

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

一,代码注意几个注解

 

spring.xml

一,

二,

<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" />

三,注意扫描包

 

posted @ 2017-01-11 14:26  一枚行者  阅读(1315)  评论(0)    收藏  举报