<?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(定时任务)配置文件相关推荐

  1. Spring+Quartz实现定时任务

    Spring整合Quartz实现定时任务步骤很简单,大致需要经过如下几步:创建任务(Job).配置JobDetail.配置触发器(Trigger).配置SchedulerFactoryBean 首先使 ...

  2. Spring中引入其他配置文件

    原文:http://www.cnblogs.com/LiuChunfu/p/5605473.html ------------------------------------------------- ...

  3. Quartz专题(二)-Spring和Quart整合

    Quartz 是 OpenSymphony 开源组织在任务调度领域的一个开源项目,完全基于Java实现.下面讲解Spring和Quart整合流程: 1.导入依赖 <dependencies> ...

  4. Spring整合Schedule定时任务详解

    Spring整合Schedule定时任务详解 Spring 定时任务官方网站 一.概述 用Spring,就是为了简单. 但是我还是要总结下java定时任务实现的几种方式. 1.TimerTask,等于 ...

  5. java配置文件实现方式_java相关:详解Spring加载Properties配置文件的四种方式

    java相关:详解Spring加载Properties配置文件的四种方式 发布于 2020-4-29| 复制链接 摘记: 一.通过 context:property-placeholder 标签实现配 ...

  6. spring cloud中通过配置文件自定义Ribbon负载均衡策略

    2019独角兽企业重金招聘Python工程师标准>>> spring cloud中通过配置文件自定义Ribbon负载均衡策略 博客分类: 微服务 一.Ribbon中的负载均衡策略 1 ...

  7. 如何在spring中读取properties配置文件里面的信息

    如何在spring中读取properties配置文件里面的信息 <!-- 正文开始 --> 一般来说.我们会将一些配置的信息放在.properties文件中. 然后使用${}将配置文件中的 ...

  8. Spring+SpringMVC +MyBatis整合配置文件案例66666

    Spring+SpringMVC +MyBatis整合配置文件案例 标签: springspringmvcmybatismvcjava 2017-04-13 19:12 228人阅读 评论(1) 收藏 ...

  9. Spring Boot——读取.properties配置文件解决方案

    解决方案 Spring Boot 读取properties配置文件时,默认读取的是application.properties. 方法一:@ConfigurationProperties注解方式 @C ...

最新文章

  1. c++中调用python脚本提示 error LNK2001: 无法解析的外部符号 __imp_Py_Initialize等错误的解决方法
  2. linux shell find depth,搞定 Linux Shell 文本处理工具,看完这篇集锦就够了
  3. mysql数据库内NOT NULL_浅谈为什么Mysql数据库尽量避免NULL
  4. 「微信小程序免费辅导教程」24,基础内容组件icon的使用探索与7月26日微信公众平台的更新解读...
  5. 带有Spring的JavaFX 2
  6. mysql 左连接 重复_mysql左连接重复行
  7. springboot3.x 集成持久层框架
  8. 武汉科技大学c语言复试题库,2016年武汉科技大学计算机科学与技术学院C语言程序设计复试笔试仿真模拟题...
  9. 多分类f1分数_机器学习之分类模型评估总结
  10. 计算机课程在线作业,计算机科学与技术作业答案
  11. 机器人工程师入门知识框架(思维导图)
  12. 生物信息学biojava|从本地读取并解析遍历genbank文件|从genbank中提取CDS等注释信息
  13. 帆软客户画像分析与客户价值模型
  14. win10安装steam有损计算机,win10系统steam安装更新失败的解决方法
  15. Linpack安装测试流程记录
  16. 【企业微信】JS-SDK引入实现向企微群聊发送图文消息
  17. python-docx 设置Table 边框样式、单元格边框样式
  18. 企业如何选择合适的精益生产方案?
  19. 优化Windows xp Professional大全
  20. 使用UltraISO制作Windows 10启动U盘

热门文章

  1. 猫眼APP选座静态界面布局
  2. 基于小波变换的图像去噪方法
  3. @webServlet注解的使用(适合初次接触的朋友)
  4. 华为正式官宣鸿蒙OS,华为正式官宣,鸿蒙OS 2.0系统即将问世,Mate 40有望首发
  5. html5如何写跳转页面跳转,HTML页面跳转的5种方法
  6. 如何清晰地思考:近一年来业余阅读的关于思维方面的知识结构整理(附大幅思维导图)
  7. 汉诺塔问题(Hanoi)
  8. 小晶粒zsm分子筛合成表征实验报告_一种小晶粒zsm-5分子筛的合成方法
  9. monkey日志分析
  10. 在微信小程序中,swiper组件(轮播图4)的常用属性