当前位置: 代码迷 >> 综合 >> Spring配置定时任务1
  详细解决方案

Spring配置定时任务1

热度:98   发布时间:2024-01-15 09:27:21.0

1.配置文件

<bean id="businessTask" class="com.yingcaiw.controller.goods.BusinessTask"/><bean id="businessTaskMethod" class = "org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"><property name="targetObject"><ref bean="businessTask"/></property><property name="targetMethod"><value>execute</value></property></bean><bean id="businessTaskBean" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean"><property name = "jobDetail"  ref="businessTaskMethod"></property><property name="cronExpression" value="0/1 * * * * ?"></property></bean><bean id="SpringJobSchedulerFactoryBean" class="org.springframework.sch
  相关解决方案