电子定时器使用方法 Spring定时器的使用
Spring定时器的使用

下面我们来看看关于Spring定时器的使用的详细代码: [] <?xml version= encoding= UTF ?> <!DOCTYPE beans PUBLIC //SPRING//DTD BEAN//EN spring beans dtd > <beans> <! <bean id= reportManagerImpl class= springframework scheduling quartz JobDetailBean > <property name= jobClass ref= reportManager /> </bean> > <span ><bean id= reportManagerImpl_month class= springframework scheduling quartz MethodInvokingJobDetailFactoryBean > <property name= targetObject ref= reportManager /> <property name= targetMethod value= addMonthReport /> </bean></span> <bean id= reportManagerImpl_week class= springframework scheduling quartz MethodInvokingJobDetailFactoryBean > <property name= targetObject ref= reportManager /> <property name= targetMethod value= addWeekReport /> </bean> <bean id= reportManagerImpl_xun class= springframework scheduling quartz MethodInvokingJobDetailFactoryBean > <property name= targetObject ref= reportManager /> <property name= targetMethod value= addXunReport /> </bean> <! 旬报生成提醒 > <bean id= checkXunAndMail class= springframework scheduling quartz MethodInvokingJobDetailFactoryBean > <property name= targetObject ref= reportManager /> <property name= targetMethod value= checkXunAndMail /> </bean> <span ><bean id= monthReportTrigger class= springframework scheduling quartz CronTriggerBean > <property name= jobDetail ref= reportManagerImpl_month /> <! 关键在配置此表达式 > <property name= cronExpression > <value> C * ?</value> <! 每月的第一天的 : 触发 C * ? > </property> </bean></span> <bean id= weekReportTrigger class= springframework scheduling quartz CronTriggerBean > <property name= jobDetail ref= reportManagerImpl_week />
lishixinzhi/Article/program/Java/ky/201311/28647