Newer
Older
xxl-job-dm / branch-dianping / dianping-job-web / src / main / resources / applicationcontext-trigger-db.xml
xueli.xue on 23 Dec 2015 1 KB init
<?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="quartzScheduler" lazy-init="false" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
		<property name="dataSource" ref="dataSource" />
        <property name="autoStartup" value="true" />
		<property name="applicationContextSchedulerContextKey"  value="applicationContextKey" /> 
        <property name="configLocation" value="classpath:quartz.properties"/>
	</bean>
	
	<!-- 协同-调度器 -->
	<bean id="dynamicSchedulerUtil" class="com.dianping.job.core.util.DynamicSchedulerUtil">
		<!-- (轻易不要变更“调度器名称”, 任务创建时会绑定该“调度器名称”) -->
        <property name="scheduler" ref="quartzScheduler"/>
    </bean>

</beans>