Commit 5c00919d90875e439cbfd723d672ab0ee9913611
1 parent
71d7d1b2d8
Exists in
master
and in
8 other branches
座机号 替换的问题
Showing 1 changed file with 53 additions and 0 deletions
platform-operate-api/src/main/resources/spring/applicationContext-quartz.xml
View file @
5c00919
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<beans xmlns="http://www.springframework.org/schema/beans" | |
| 3 | + xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" | |
| 4 | + xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 5 | + xmlns:cache="http://www.springframework.org/schema/cache" xmlns:task="http://www.springframework.org/schema/task" | |
| 6 | + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
| 7 | + http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd | |
| 8 | + http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd | |
| 9 | + http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-3.1.xsd | |
| 10 | + http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd"> | |
| 11 | + | |
| 12 | + <bean id="startWorkJob" class="com.lyms.platform.biz.service.PatientsService"></bean> | |
| 13 | + <!--自动分娩任务 --> | |
| 14 | + <bean id="autoMatDeliverTask" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> | |
| 15 | + <!-- 要调用的bean --> | |
| 16 | + <property name="targetObject" ref="startWorkJob"></property> | |
| 17 | + <!-- 要调用的Method --> | |
| 18 | + <property name="targetMethod" value="autoMatDeliver"></property> | |
| 19 | + <!-- 是否并发,false表示 如果发生错误也不影响下一次的调用 --> | |
| 20 | + <property name="concurrent" value="false"></property> | |
| 21 | + </bean> | |
| 22 | + | |
| 23 | + <bean id="delSieveTask" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> | |
| 24 | + <!-- 要调用的bean --> | |
| 25 | + <property name="targetObject" ref="startWorkJob"></property> | |
| 26 | + <!-- 要调用的Method --> | |
| 27 | + <property name="targetMethod" value="delSieve"></property> | |
| 28 | + <!-- 是否并发,false表示 如果发生错误也不影响下一次的调用 --> | |
| 29 | + <property name="concurrent" value="false"></property> | |
| 30 | + </bean> | |
| 31 | + | |
| 32 | + <!-- 配置一个触发器 --> | |
| 33 | + <bean id="startWorkTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"> | |
| 34 | + <property name="jobDetail" ref="autoMatDeliverTask"></property> | |
| 35 | + <property name="cronExpression" value="0 0 1 * * ?"></property> | |
| 36 | + </bean> | |
| 37 | + | |
| 38 | + <!-- 配置一个触发器 --> | |
| 39 | + <bean id="delSieveTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"> | |
| 40 | + <property name="jobDetail" ref="delSieveTask"></property> | |
| 41 | + <property name="cronExpression" value="0 30 1 * * ?"></property> | |
| 42 | + </bean> | |
| 43 | + | |
| 44 | + <!-- 总调度,用于启动定时器 --> | |
| 45 | + <bean id="schedulerFactory" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> | |
| 46 | + <property name="triggers" > | |
| 47 | + <list> | |
| 48 | + <ref bean="startWorkTrigger"/> | |
| 49 | + <ref bean="delSieveTrigger"/> | |
| 50 | + </list> | |
| 51 | + </property> | |
| 52 | + </bean> | |
| 53 | +</beans> |