You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xxl-job/xxl-job-admin/src/main/resources/applicationcontext-trigger-...

35 lines
1.6 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?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">
<!-- 全站静态化:Job Detail -->
<bean id="generateNetHtmlJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="triggerService" />
<property name="targetMethod" value="generateNetHtml" />
<property name="concurrent" value="false" />
</bean>
<!-- 全站静态化:Cron Trigger (quartz-2.x的配置) -->
<bean id="generateNetHtmlTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="generateNetHtmlJobDetail" />
<property name="cronExpression" value="0/10 * * * * ? *" />
</bean>
<!-- Job被加载到内存中每个集群节点相互独立都会执行该任务 -->
<bean name="startQuertz" lazy-init="false" autowire="no" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="generateNetHtmlTrigger" />
</list>
</property>
</bean>
</beans>