spring 定时

<bean id="rssTimerTask" class="com.telecomjs.uec.home.ehousekeeper.newspaper.timer.NewsPaperTimerTask">
<property name="newsPaperDao" ref="newsPaperDao"/>

</bean>
<bean id="scheduleTask" class="org.springframework.scheduling.timer.ScheduledTimerTask">
<property name="delay" value="1000"/>
<property name="period" value="600000"/>
<property name="timerTask" ref="rssTimerTask"/>
</bean>
<bean id="timerFactory" class="org.springframework.scheduling.timer.TimerFactoryBean">
<property name="scheduledTimerTasks">
<list>
<ref bean="scheduleTask"/>
</list>
</property>
</bean>

你可能感兴趣的:(spring)