为石英线程池设置线程数

lap*_*ots 5 spring quartz-scheduler

我已经创建了文件quartz.properties并将其放在类路径中。属性是

org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 1
Run Code Online (Sandbox Code Playgroud)

但是当我启动应用程序时,我收到此消息

Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
Run Code Online (Sandbox Code Playgroud)

它是否加载属性?无论如何,我只为调度程序运行一个线程......

lap*_*ots 1

当我使用时,spring我确实喜欢这样。我在我的公共properties文件中创建了一个属性

quartz.threadPool.threadCount=1
Run Code Online (Sandbox Code Playgroud)

然后在我的xml中设置quartzProperties字段ScheduleFactoryBean

<property name="quartzProperties">
    <util:properties>
        <prop key="org.quartz.threadPool.threadCount">
            ${quartz.threadPool.threadCount}
        </prop>
    </util:properties>
</property>
Run Code Online (Sandbox Code Playgroud)