In the spring read Bean configuration file, configure the following
<bean id= "beanscheduler" class=" Org.springframework.scheduling.quartz.CronTriggerBean "> < property name="Jobdetail"> <bean id= "work1"class=" Org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean "> < property name="TargetObject" ref="xxx" />Beanid of class registration for timed tasks< property name="Targetmethod" value="XXX" />A method that references a bean</Bean> </Property > < property name="Cronexpression" value="0 0 4 * *?" />Method Execution Time</Bean> <Bean class="Org.springframework.scheduling.quartz.SchedulerFactoryBean" lazy-init="false" autowire="No"> < property name="triggers"> <list> <ref Bean="Beanscheduler"/> </list> </Property > < property name="Quartzproperties"> <props> <prop key="Org.quartz.jobStore.class">Org.quartz.simpl.RAMJobStore</prop> </props> </Property > </Bean>
Spring timed tasks