update 修复 thread-pool: enabled 配置不生效问题

This commit is contained in:
疯狂的狮子li 2021-07-14 10:43:33 +08:00
parent 55546dfc80
commit 28fa991fc2
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ public class ThreadPoolConfig {
private ThreadPoolProperties threadPoolProperties; private ThreadPoolProperties threadPoolProperties;
@Bean(name = "threadPoolTaskExecutor") @Bean(name = "threadPoolTaskExecutor")
@ConditionalOnProperty(prefix = "threadPoolTaskExecutor", 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(threadPoolProperties.getMaxPoolSize()); executor.setMaxPoolSize(threadPoolProperties.getMaxPoolSize());