spring_jobDemo.xml
1.19 KB
<?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:job="http://vm.yoho.com/schema/kisjob/job"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://vm.yoho.com/schema/kisjob/job
http://vm.yoho.com/schema/kisjob/job/job.xsd
">
<context:component-scan base-package="com.yoho.kisjob.demo" />
<job:define id="jobDemo1" job-type="singleJob" job-ref="testBaseJob">
<job:timer job-run-type="cron" cron="20 * * * * ?" />
</job:define>
<job:define id="jobDemo2" job-type="elastaicJob" mapper-ref="testMapper"
executor-ref="testExecutor">
<job:param name="param1" value="value1" />
<job:param name="param2" value="value2" />
<job:timer job-run-type="cron" cron="40 * * * * ?" />
</job:define>
</beans>