applicationcontext-trigger-db.xml 1.4 KB

12345678910111213141516171819202122232425
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
  4. xmlns:util="http://www.springframework.org/schema/util"
  5. xsi:schemaLocation="http://www.springframework.org/schema/beans
  6. http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  7. http://www.springframework.org/schema/context
  8. http://www.springframework.org/schema/context/spring-context-3.0.xsd
  9. http://www.springframework.org/schema/util
  10. http://www.springframework.org/schema/util/spring-util.xsd">
  11. <bean id="quartzScheduler" lazy-init="false" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
  12. <property name="dataSource" ref="dataSource" />
  13. <property name="autoStartup" value="true" />
  14. <property name="applicationContextSchedulerContextKey" value="applicationContextKey" />
  15. <property name="configLocation" value="classpath:quartz.properties"/>
  16. </bean>
  17. <!-- 协同-调度器 -->
  18. <bean id="dynamicSchedulerUtil" class="com.dianping.job.core.util.DynamicSchedulerUtil">
  19. <!-- (轻易不要变更“调度器名称”, 任务创建时会绑定该“调度器名称”) -->
  20. <property name="scheduler" ref="quartzScheduler"/>
  21. </bean>
  22. </beans>