amwiacel
ADF培训
2012-01-05 17:00

关于一个spring时间高度问题

  • spring

先看代码:

[code="java"]







<bean id="userLoadTrigger"
    class="org.springframework.scheduling.quartz.CronTriggerBean">
    <property name="jobDetail">
        <ref bean="userLoadInvokingJobDetail"/>
    </property>
    <property name="cronExpression">
        <value>0 38 16 * * ?</value>
    </property>
</bean>
<bean id="dataLoadTrigger"
    class="org.springframework.scheduling.quartz.CronTriggerBean">
    <property name="jobDetail">
        <ref bean="dataLoadInvokingJobDetail"/>
    </property>
    <property name="cronExpression">
        <value>0 50 8,16 * * ?</value>
    </property>
</bean>

<bean id="userLoadInvokingJobDetail"
    class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
    <property name="targetObject" ref="fingerSystemManageImpl"/>
    <property name="targetMethod">
        <value>loadUser</value>
    </property>
</bean>

<bean id="dataLoadInvokingJobDetail"
    class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
    <property name="targetObject" ref="fingerSystemManageImpl"/>
    <property name="targetMethod">
        <value>loadData</value>
    </property>
</bean>

    <bean id="fingerSystemManageImpl" class="com.包名(省略).FingerSystemManageImpl" scope="prototype"/>

@Override
public void loadData() {
    System.out.println(" begin loadData");

}

[/code]

那段打印代码一直没执行,麻烦看一下问题在哪?

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

4条回答

为你推荐