参考网站 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" />
三,注意扫描包