spring定时器
来源:互联网 发布:mac excel快捷键大全 编辑:程序博客网 时间:2024/06/08 16:32
<?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:aop="http://www.springframework.org/schema/aop"xmlns:tx="http://www.springframework.org/schema/tx"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsdhttp://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsdhttp://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"><!-- 1 引入spring定时器的支持类 同时指定作用于那个类 哪个方法 --><bean id="helloWord"class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"><!--targetObject指的是触发对象所在的类这个类已经在spring中注册了,这里直接把bean的id拿过来用就可以了--><property name="targetObject" ref="productServiceImpl" /><!-- targetMethod指的是触发的方法,当触发条件符合时,就会自动执行test方法 --><property name="targetMethod" value="sendEmail" /></bean><bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"><property name="jobDetail"><ref bean="helloWord" /></property><property name="cronExpression"><value>0 0/2 20 * * ?</value></property></bean><!--公共启动任务 3--><bean id="quartzFactory"class="org.springframework.scheduling.quartz.SchedulerFactoryBean"><!-- triggers属性接受一组触发器 --><property name="triggers"><list><ref local="cronTrigger" /></list></property></bean></beans>
0 0
- spring定时器
- Spring定时器
- Spring 定时器
- Spring定时器
- spring定时器
- Spring定时器
- spring 定时器
- Spring定时器
- spring定时器
- Spring定时器
- spring 定时器
- spring 定时器
- spring 定时器
- Spring定时器
- spring定时器
- spring 定时器
- spring 定时器
- spring定时器
- Android RelativeLayout属性
- 记录文件操作及其相关字符串操作
- oracle四个重要的后台进程(DBWR / LGWR / ARCH / CKPT)
- Sysbase数据库性能优化
- 9-39
- spring定时器
- java.util.Queue用法
- 悲剧啊!男子网恋领证后见丈母娘竟发现...
- 专家谈Linux选型:掌握共性 拒厂商绑架
- linux进程学习
- NSUserDefault的用法
- 循环删除List中的元素的问题-两种方式(不一样的结果)
- 详解Linux运维工程师应具备的十大技能
- 日期格式转换