定时器在java用的比较普遍,这里稍作整理下 ,主要是配置中的信息整理
后续会继续补充
<?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"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<bean id="unifyJob" class="cn.huimin100.pay.center.controller.trade.RefundController"></bean>
<bean id="refundTask" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="unifyJob"></property>
<property name="targetMethod" value="execute"></property>
<property name="concurrent" value="false"></property>
</bean>
<bean id="refundTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="refundTask"></property>
<property name="cronExpression" value="0 0/2 * * * ?"></property>
</bean>
<!-- 定时器执行 -->
<bean id="schedulerFactory" class="org.springframework.schedu