<!-- 最终的启动工厂 list里面配置多个定时触发器-->
<bean id="SpringJobSchedulerFactoryBean" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="consumeTimer"/>
</list>
</property>
<property name="configLocation" value="classpath:quartz.properties"/>
</bean>
configLocation属性一定要配置,否则quartz.properties里面设置的线程数量org.quartz.threadPool.threadCount无效,还是使用10个
<bean id="SpringJobSchedulerFactoryBean" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="consumeTimer"/>
</list>
</property>
<property name="configLocation" value="classpath:quartz.properties"/>
</bean>
configLocation属性一定要配置,否则quartz.properties里面设置的线程数量org.quartz.threadPool.threadCount无效,还是使用10个
默认使用SimpleThreadPool,如果设置了TaskExecutor可以使用a JDK 1.5 ThreadPoolExecut

本文介绍如何在Spring中集成Quartz2,并详细说明如何设置线程池的线程数量,以优化任务调度的性能。默认情况下,Quartz使用SimpleThreadPool,但可以通过配置使用Java 1.5的ThreadPoolExecutor或CommonJ WorkManager作为后台执行器。
823

被折叠的 条评论
为什么被折叠?



