Skip to content

Commit 3cc9a3b

Browse files
committed
Remove duplicate applicationTaskExecutor bean method
See gh-35710
1 parent 39f6b85 commit 3cc9a3b

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskExecutionAutoConfiguration.java

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,8 +16,6 @@
1616

1717
package org.springframework.boot.autoconfigure.task;
1818

19-
import java.util.concurrent.Executor;
20-
2119
import org.springframework.beans.factory.ObjectProvider;
2220
import org.springframework.boot.autoconfigure.AutoConfiguration;
2321
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@@ -29,10 +27,8 @@
2927
import org.springframework.boot.task.TaskExecutorCustomizer;
3028
import org.springframework.context.annotation.Bean;
3129
import org.springframework.context.annotation.Import;
32-
import org.springframework.context.annotation.Lazy;
3330
import org.springframework.core.task.TaskDecorator;
3431
import org.springframework.core.task.TaskExecutor;
35-
import org.springframework.scheduling.annotation.AsyncAnnotationBeanPostProcessor;
3632
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
3733

3834
/**
@@ -75,12 +71,4 @@ public TaskExecutorBuilder taskExecutorBuilder(TaskExecutionProperties propertie
7571
return builder;
7672
}
7773

78-
@Lazy
79-
@Bean(name = { APPLICATION_TASK_EXECUTOR_BEAN_NAME,
80-
AsyncAnnotationBeanPostProcessor.DEFAULT_TASK_EXECUTOR_BEAN_NAME })
81-
@ConditionalOnMissingBean(Executor.class)
82-
public ThreadPoolTaskExecutor applicationTaskExecutor(TaskExecutorBuilder builder) {
83-
return builder.build();
84-
}
85-
8674
}

0 commit comments

Comments
 (0)