mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-11-10 19:23:43 +08:00
fix 修复 全局线程池配置 核心线程与最大线程 参数填反问题
This commit is contained in:
@@ -33,8 +33,8 @@ public class ThreadPoolConfig {
|
|||||||
@ConditionalOnProperty(prefix = "thread-pool", name = "enabled", havingValue = "true")
|
@ConditionalOnProperty(prefix = "thread-pool", name = "enabled", havingValue = "true")
|
||||||
public ThreadPoolTaskExecutor threadPoolTaskExecutor() {
|
public ThreadPoolTaskExecutor threadPoolTaskExecutor() {
|
||||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||||
executor.setMaxPoolSize(core);
|
executor.setCorePoolSize(core);
|
||||||
executor.setCorePoolSize(core * 2);
|
executor.setMaxPoolSize(core * 2);
|
||||||
executor.setQueueCapacity(threadPoolProperties.getQueueCapacity());
|
executor.setQueueCapacity(threadPoolProperties.getQueueCapacity());
|
||||||
executor.setKeepAliveSeconds(threadPoolProperties.getKeepAliveSeconds());
|
executor.setKeepAliveSeconds(threadPoolProperties.getKeepAliveSeconds());
|
||||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||||
|
|||||||
Reference in New Issue
Block a user