Spring的quart(定时任务)配置文件
<?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:context="http://www.springframework.org/schema/context"xmlns:tx="http://www.springframework.org/schema/tx"xmlns:aop="http://www.springframework.org/schema/aop"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsdhttp://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsdhttp://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"default-lazy-init="false" default-autowire="no"><bean id="dsrw" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"><property name="triggers"><list><!-- 第一个任务 --><ref local="rw1" /><!-- 第二个任务 --><ref local="rw2"/></list></property></bean><!-- 第一个任务 --><bean id="rw1" class="org.springframework.scheduling.quartz.CronTriggerBean"><property name="jobDetail"><ref bean="gt1" /></property><property name="cronExpression"><value>0 58 14 * * ?</value></property></bean> <bean id="gt1" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"><property name="targetObject"><ref bean="gt2" /></property><property name="targetMethod"><value>执行类的方法名</value></property></bean><bean id="gt2" class="执行类的路径" > <property name="dingdanService"><ref bean="dingdanService"/></property></bean><!-- 第二个任务 --><bean id="rw2" class="org.springframework.scheduling.quartz.CronTriggerBean"><property name="jobDetail"><ref bean="grw1" /></property><property name="cronExpression"><value>0 0 0,12 * * ?</value></property></bean><bean id="grw1" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"><property name="targetObject"><ref bean="grw2"/></property><property name="targetMethod"><value>类中方法名</value></property></bean><bean id="grw2" class="类路径" ></bean>
</beans>
Spring的quart(定时任务)配置文件相关推荐
- Spring+Quartz实现定时任务
Spring整合Quartz实现定时任务步骤很简单,大致需要经过如下几步:创建任务(Job).配置JobDetail.配置触发器(Trigger).配置SchedulerFactoryBean 首先使 ...
- Spring中引入其他配置文件
原文:http://www.cnblogs.com/LiuChunfu/p/5605473.html ------------------------------------------------- ...
- Quartz专题(二)-Spring和Quart整合
Quartz 是 OpenSymphony 开源组织在任务调度领域的一个开源项目,完全基于Java实现.下面讲解Spring和Quart整合流程: 1.导入依赖 <dependencies> ...
- Spring整合Schedule定时任务详解
Spring整合Schedule定时任务详解 Spring 定时任务官方网站 一.概述 用Spring,就是为了简单. 但是我还是要总结下java定时任务实现的几种方式. 1.TimerTask,等于 ...
- java配置文件实现方式_java相关:详解Spring加载Properties配置文件的四种方式
java相关:详解Spring加载Properties配置文件的四种方式 发布于 2020-4-29| 复制链接 摘记: 一.通过 context:property-placeholder 标签实现配 ...
- spring cloud中通过配置文件自定义Ribbon负载均衡策略
2019独角兽企业重金招聘Python工程师标准>>> spring cloud中通过配置文件自定义Ribbon负载均衡策略 博客分类: 微服务 一.Ribbon中的负载均衡策略 1 ...
- 如何在spring中读取properties配置文件里面的信息
如何在spring中读取properties配置文件里面的信息 <!-- 正文开始 --> 一般来说.我们会将一些配置的信息放在.properties文件中. 然后使用${}将配置文件中的 ...
- Spring+SpringMVC +MyBatis整合配置文件案例66666
Spring+SpringMVC +MyBatis整合配置文件案例 标签: springspringmvcmybatismvcjava 2017-04-13 19:12 228人阅读 评论(1) 收藏 ...
- Spring Boot——读取.properties配置文件解决方案
解决方案 Spring Boot 读取properties配置文件时,默认读取的是application.properties. 方法一:@ConfigurationProperties注解方式 @C ...
最新文章
- c++中调用python脚本提示 error LNK2001: 无法解析的外部符号 __imp_Py_Initialize等错误的解决方法
- linux shell find depth,搞定 Linux Shell 文本处理工具,看完这篇集锦就够了
- mysql数据库内NOT NULL_浅谈为什么Mysql数据库尽量避免NULL
- 「微信小程序免费辅导教程」24,基础内容组件icon的使用探索与7月26日微信公众平台的更新解读...
- 带有Spring的JavaFX 2
- mysql 左连接 重复_mysql左连接重复行
- springboot3.x 集成持久层框架
- 武汉科技大学c语言复试题库,2016年武汉科技大学计算机科学与技术学院C语言程序设计复试笔试仿真模拟题...
- 多分类f1分数_机器学习之分类模型评估总结
- 计算机课程在线作业,计算机科学与技术作业答案
- 机器人工程师入门知识框架(思维导图)
- 生物信息学biojava|从本地读取并解析遍历genbank文件|从genbank中提取CDS等注释信息
- 帆软客户画像分析与客户价值模型
- win10安装steam有损计算机,win10系统steam安装更新失败的解决方法
- Linpack安装测试流程记录
- 【企业微信】JS-SDK引入实现向企微群聊发送图文消息
- python-docx 设置Table 边框样式、单元格边框样式
- 企业如何选择合适的精益生产方案?
- 优化Windows xp Professional大全
- 使用UltraISO制作Windows 10启动U盘