quarz定时任务
来源:互联网 发布:ajax跨域请求不是json 编辑:程序博客网 时间:2024/06/07 21:39
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
</dependency>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd">
<!-- 自定义要执行的job -->
<bean id="myJob" class="com.mall.quarz.MyJob"></bean>
<!-- scheduler调度器 -->
<bean id="startQuertz" class="org.springframework.scheduling.quartz.SchedulerFactoryBean" lazy-init="false" autowire="no">
<property name="triggers">
<list>
<ref bean="myJobTrigger"/>
</list>
</property>
</bean>
<!-- 触发器 -->
<bean id="myJobTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail">
<ref bean="myJobDetail"/>
</property>
<property name="cronExpression">
<value>1/3 * * * * ? *</value>
</property>
</bean>
<!-- 任务详情 -->
<bean id="myJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject">
<ref bean="myJob"/>
</property>
<property name="targetMethod">
<value>doJob</value>
</property>
</bean>
</beans>
- Quarz写定时任务
- quarz定时任务
- Spring和Quarz集成,实现定时任务
- Spring与quarz结合处理定时任务需求
- quarz定时表达式
- quarz
- 任务调度4-------Spring中使用Quarz
- 定时任务
- 定时任务
- 定时任务
- 定时任务
- 定时任务
- 定时任务
- 定时任务
- 定时任务
- 定时任务
- 定时任务
- 定时任务
- 第五周项目1——建立顺序栈算法库
- 做新的系统需要注意点啥
- 写给大家看的设计书学习笔记
- CXF实现webService服务(一)
- 第五周 项目一 建立顺序栈算法库
- quarz定时任务
- 【第四周项目4】建设双链表算法库
- html 札记
- CSR:SSL证书的孵化器
- 【设计模式】控制反转(IoC)与依赖注入(DI)
- java中double运算的精度丢失问题
- VMware vcenter上传文件失败且vsphere client登陆失败。
- Android深度探索:HAL与驱动开发学习笔记--中断
- vpn