<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
<bean id="schedulerFactoryBean"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="cornTrigger" />
</list>
</property>
</bean>
<bean id="cornTrigger"
class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<!-- 指向调度方案的ID-->
<ref bean="task" />
</property>
<property name="cronExpression">
<value>* * 1 * * ?</value>
</property>
</bean>
<!-- 定义个调度方案的ID-->
<bean id="task"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<!-- 调度的类的bean的ID-->
<property name="targetObject" ref="do"/>
<!-- 调度的类的bean的中的方法-->
<property name="targetMethod" value="dowhat" />
</bean>
<!-- 调度的类的bean-->
<bean id="do" class="com.fcb.service.impl.TaskSchedulingServiceImp"></bean>
</beans>