Spring执行任务(四)之Quartz(不继承QuartzJobBean类)

 原文地址:http://blog.sina.com.cn/s/blog_4cd3174a01000ava.html

<bean id="someData" class="onlyfun.caterpillar.JobData"></bean> 

<bean id ="someJob" class="onlyfun.caterpillar.DemoJob">

<property name="jobData">

<ref bean="someData" />

</property>

</bean> 

<bean id="jobDetailBean"class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">

<property name="targetObject">

<ref bean="someJob"/>

</property>

<property name="targetMethod">

<value>execute</value>

</property>

</bean> 

    ……

    ……

</beans>

你可能感兴趣的:(quartz,Spring执行任务)