首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

spring配备job

2012-10-28 
spring配置job!--需要执行的 job-- bean idtestJob reftestJob/property!--job执行规则--p

spring配置job

<!--需要执行的 job-->
<bean id="testJob" ref="testJob"></property>
<!--job执行规则-->
<property name="cronExpression" value="0/5*****?"></property>
</bean>
<!--启动jbo的主函数 -->
<bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<ref bean="checkTrigger"/>
</property>
</bean>
 
--job 执行的类
public class TestJob implements StatefulJob{

@Override
public void execute(JobExecutionContext jctx) throws JobExecutionException {

}

}

热点排行