<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
	http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
	<!-- <import resource="contextBeans.xml" /> -->
   
    <bean name="synResource" class="com.fuzamei.task.BlockChainTask"/>
    <!-- 定期更新权重 -->
    <bean name="scanBlockChainJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
        <property name="targetObject" ref="synResource" />
        <property name="targetMethod" value="updateWeight" />
        <property name="concurrent" value="false" />
    </bean>
    <bean id="scanBlockChainTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
        <property name="jobDetail" ref="scanBlockChainJob"/>
		<property name="cronExpression" value="* */2 * * * ?" />
    </bean>
    <!-- 定期更新统计数据 -->
    <bean name="scanBlockChainJob1" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
        <property name="targetObject" ref="synResource" />
        <property name="targetMethod" value="updateInfoToStatistical" />
        <property name="concurrent" value="false" />
    </bean>
    <bean id="scanBlockChainTrigger1" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
        <property name="jobDetail" ref="scanBlockChainJob1"/>
		<property name="cronExpression" value="*/2 * * * * ?" />
    </bean>
     <!-- 定期轮询区块链接口 -->
    <bean name="scanBlockChainJob2" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
        <property name="targetObject" ref="synResource" />
        <property name="targetMethod" value="updateCaseDetail" />
        <property name="concurrent" value="false" />
    </bean>
    <bean id="scanBlockChainTrigger2" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
        <property name="jobDetail" ref="scanBlockChainJob2"/>
		<property name="cronExpression" value="*/2 * * * * ?" />
    </bean>
    <!-- 启动调度器 -->
    <bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
        <property name="triggers">
            <list>
               
                <!-- <ref bean="scanBlockChainTrigger"/>
                <ref bean="scanBlockChainTrigger1"/>
                <ref bean="scanBlockChainTrigger2"/> -->
            </list>
        </property>
    </bean>
</beans>
