Optimize SpEL and property placeholder support for @Async qualifiers
See gh-27818 Closes gh-28549
This commit is contained in:
@@ -146,6 +146,9 @@ public class EnableAsyncTests {
|
||||
|
||||
Future<Thread> workerThread2 = asyncBean.myWork2();
|
||||
assertThat(workerThread2.get().getName()).startsWith("myExecutor2-");
|
||||
|
||||
Future<Thread> workerThread3 = asyncBean.defaultExecutor();
|
||||
assertThat(workerThread3.get().getName()).startsWith("SimpleAsyncTaskExecutor");
|
||||
}
|
||||
finally {
|
||||
System.clearProperty("myExecutor");
|
||||
@@ -382,6 +385,11 @@ public class EnableAsyncTests {
|
||||
public Future<Thread> myWork2() {
|
||||
return new AsyncResult<>(Thread.currentThread());
|
||||
}
|
||||
|
||||
@Async("${my.app.targetExecutor:}")
|
||||
public Future<Thread> defaultExecutor() {
|
||||
return new AsyncResult<>(Thread.currentThread());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user