Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
6f86a843
Commit
6f86a843
authored
Jan 28, 2019
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish "Alias auto-configured `TaskExecutor` to make async tasks use it"
Closes gh-15748
parent
d0859f15
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
TaskExecutionAutoConfiguration.java
...ot/autoconfigure/task/TaskExecutionAutoConfiguration.java
+4
-4
TaskExecutionAutoConfigurationTests.java
...toconfigure/task/TaskExecutionAutoConfigurationTests.java
+1
-1
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskExecutionAutoConfiguration.java
View file @
6f86a843
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -30,6 +30,7 @@ import org.springframework.context.annotation.Configuration;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.core.task.TaskDecorator
;
import
org.springframework.core.task.TaskExecutor
;
import
org.springframework.scheduling.annotation.AsyncAnnotationBeanPostProcessor
;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
;
/**
...
...
@@ -49,8 +50,6 @@ public class TaskExecutionAutoConfiguration {
*/
public
static
final
String
APPLICATION_TASK_EXECUTOR_BEAN_NAME
=
"applicationTaskExecutor"
;
public
static
final
String
ASYNC_TASK_EXECUTOR_BEAN_NAME
=
"taskExecutor"
;
private
final
TaskExecutionProperties
properties
;
private
final
ObjectProvider
<
TaskExecutorCustomizer
>
taskExecutorCustomizers
;
...
...
@@ -82,7 +81,8 @@ public class TaskExecutionAutoConfiguration {
}
@Lazy
@Bean
(
name
=
{
APPLICATION_TASK_EXECUTOR_BEAN_NAME
,
ASYNC_TASK_EXECUTOR_BEAN_NAME
})
@Bean
(
name
=
{
APPLICATION_TASK_EXECUTOR_BEAN_NAME
,
AsyncAnnotationBeanPostProcessor
.
DEFAULT_TASK_EXECUTOR_BEAN_NAME
})
@ConditionalOnMissingBean
(
Executor
.
class
)
public
ThreadPoolTaskExecutor
applicationTaskExecutor
(
TaskExecutorBuilder
builder
)
{
return
builder
.
build
();
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/task/TaskExecutionAutoConfigurationTests.java
View file @
6f86a843
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment