applicationcontext-xxl-job.xml 1.4 KB

1234567891011121314151617181920212223242526
  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"
  4. xsi:schemaLocation="http://www.springframework.org/schema/beans
  5. http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
  6. <!-- quartz-调度器 -->
  7. <bean id="quartzScheduler" lazy-init="false" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
  8. <property name="dataSource" ref="dataSource" />
  9. <property name="autoStartup" value="true" /> <!--自动启动 -->
  10. <property name="startupDelay" value="20" /> <!--延时启动 -->
  11. <property name="applicationContextSchedulerContextKey" value="applicationContextKey" />
  12. <property name="configLocation" value="classpath:quartz.properties"/>
  13. </bean>
  14. <!-- 协同-调度器 -->
  15. <bean id="dynamicSchedulerUtil" class="com.xxl.job.admin.core.schedule.XxlJobDynamicScheduler" init-method="init" destroy-method="destroy" >
  16. <!-- (轻易不要变更“调度器名称”, 任务创建时会绑定该“调度器名称”) -->
  17. <property name="scheduler" ref="quartzScheduler"/>
  18. <!-- 调度中心回调IP[选填],为空则自动获取 -->
  19. <!--<property name="callBackIp" value=""/>-->
  20. <!-- 调度中心回调端口号 -->
  21. <property name="callBackPort" value="8888"/>
  22. </bean>
  23. </beans>