为什么Spring SchedulerFactoryBean.waitForJobsToCompleteOnShutdown默认为false

时间:2020-05-07 23:35:19

标签: spring

SchedulerFactoryBean.waitForJobsToCompleteOnShutdown默认是否为false是否有特定原因?如果SchedulerFactoryBean.waitForJobsToCompleteOnShutdown设置为false,则线程关闭将是异步的,当雄猫服务器关闭时,会有令人讨厌的泄漏线程警告。对我来说,每次将SchedulerFactoryBean设置为true时,我们都必须提供SchedulerFactoryBean配置,这似乎很愚蠢。 SchedulerFactoryBean.waitForJobsToCompleteOnShutdown默认为true会更合逻辑。

0 个答案:

没有答案