我的代码
<bean id="EventNotificationDao" class="cn.secure.dao.EventNotificationDao">
<property name="jdbcTemplate" ref="jdbcTemplate" />
</bean>
<bean id="EventNotificationService" class="cn.secure.service.impl.EventNotificationServiceImpl">
<property name="EventNotificationDao" ref="EventNotificationDao" />
</bean>
<bean id="myTask" class="cn.secure.web.front.EventNotificationController">
<property name="EventNotificationService" ref="EventNotificationService" />
</bean>
<bean id="upgradeJobDetail1" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref ="myTask" />
<property name="targetMethod" value="addHttpNowData" />
</bean>
<bean id="upgradeTrigger1" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="upgradeJobDetail1" />
<property name="cronExpression" value="0/2 * * ? * *"/>
</bean>
配置未执行,未报告任何错误
<bean lazy-init="false"
class=" org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="upgradeTrigger1" />
</list>
</property>
<property name="taskExecutor" ref="executor" />
</bean>
尝试:
<bean lazy-init=‘false’ class=" org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="upgradeTrigger1" />
</list>
</property>
<property name="autoStartup" value="true" />
<property name="startupDelay" value="30"/>
</bean>