spring task注解定时器

it2022-05-05  155

参考网站 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" />

三,注意扫描包

 

转载于:https://www.cnblogs.com/whb11/p/6273529.html


最新回复(0)