Spring中Quartz的最精简的配置

<bean id="parserJob4Pos" class="org.springframework.scheduling.quartz.JobDetailBean">
        <property name="jobClass">
                        <!-- 这里的myQuartzJobBean需要继承QuartzJobBean -->
            <value>com.bejson.com.myQuartzJobBean</value>
        </property>
    </bean>
      
    <bean id="cronParserTrigger4Pos" class="org.springframework.scheduling.quartz.CronTriggerBean">
        <property name="jobDetail" ref="parserJob4Pos" />
        <property name="cronExpression">
            <value>0 0/1 * * * ?</value>
        </property>
    </bean>
  
    <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
        <property name="triggers">
            <list>
                <ref bean="cronParserTrigger4Pos" />
            </list>
        </property>
    </bean>

  

posted @ 2016-06-21 10:08  汪强胜  Views(336)  Comments(0Edit  收藏  举报