|
1 | 1 | /*
|
2 |
| - * Copyright 2012-2022 the original author or authors. |
| 2 | + * Copyright 2012-2023 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
16 | 16 |
|
17 | 17 | package org.springframework.boot.autoconfigure.task;
|
18 | 18 |
|
19 |
| -import java.util.concurrent.Executor; |
20 |
| - |
21 | 19 | import org.springframework.beans.factory.ObjectProvider;
|
22 | 20 | import org.springframework.boot.autoconfigure.AutoConfiguration;
|
23 | 21 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
|
29 | 27 | import org.springframework.boot.task.TaskExecutorCustomizer;
|
30 | 28 | import org.springframework.context.annotation.Bean;
|
31 | 29 | import org.springframework.context.annotation.Import;
|
32 |
| -import org.springframework.context.annotation.Lazy; |
33 | 30 | import org.springframework.core.task.TaskDecorator;
|
34 | 31 | import org.springframework.core.task.TaskExecutor;
|
35 |
| -import org.springframework.scheduling.annotation.AsyncAnnotationBeanPostProcessor; |
36 | 32 | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
37 | 33 |
|
38 | 34 | /**
|
@@ -75,12 +71,4 @@ public TaskExecutorBuilder taskExecutorBuilder(TaskExecutionProperties propertie
|
75 | 71 | return builder;
|
76 | 72 | }
|
77 | 73 |
|
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 |
| - |
86 | 74 | }
|
0 commit comments