Newer
Older
xxl-job-dm / xxl-job-simple / src / main / resources / applicationcontext-trigger-local.xml
xueli.xue on 26 Dec 2015 1 KB JobBean交互完善
<?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:util="http://www.springframework.org/schema/util"
	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
           http://www.springframework.org/schema/util 
           http://www.springframework.org/schema/util/spring-util.xsd">

	<bean id="beatJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
		<property name="targetObject" ref="triggerService" />
		<property name="targetMethod" value="beat" />
		<property name="concurrent" value="false" />
	</bean>
	
	<bean id="beatTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
		<property name="jobDetail" ref="beatJobDetail" />
		<property name="cronExpression" value="0/10 * * * * ? *" />
	</bean>
	
	<!-- 进程-调度器 -->
	<bean name="jvmQuertz" lazy-init="false" autowire="no" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
		<property name="triggers">
			<list>
				<!-- <ref bean="beatTrigger" /> -->
			</list>
		</property>
	</bean>

</beans>