禁用quartz自动检查更新的3种方法
1,
<bean id="startQuertz" lazy-init="false" autowire="no" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="triggers"> <list> <ref bean="cronQuartzClock"/><!--申请--> <!--<ref bean="cronXwQuartzClock"/>行为--> </list> </property> <property name="schedulerContextAsMap"> <map> <!-- spring 管理的service需要放到这里,才能够注入成功 --> <description>schedulerContextAsMap</description> <entry key="customerService" value-ref="customerServiceImpl"/> </map> </property> <property name="quartzProperties"> <props> <!-- 禁用quartz自动检查更新 --> <prop key="org.quartz.scheduler.skipUpdateCheck">true</prop> </props> </property> </bean>
2,
启动参数中添加
-Dorg.terracotta.quartz.skipUpdateCheck=true
3,
启动的类中添加
System.setProperty("org.terracotta.quartz.skipUpdateCheck","true");
时间: 2024-10-13 18:26:30