Polish `MyTaskExecutorConfiguration.kt` sample code

This commit is contained in:
Stéphane Nicoll 2025-05-08 22:55:28 -07:00 committed by Phillip Webb
parent f08d3a5ed0
commit b52b4d1b9a
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ class MyTaskExecutorConfiguration {
@Bean("taskExecutor")
fun taskExecutor(): ThreadPoolTaskExecutor {
val threadPoolTaskExecutor = ThreadPoolTaskExecutor()
threadPoolTaskExecutor.threadNamePrefix = "async-"
threadPoolTaskExecutor.setThreadNamePrefix("async-")
return threadPoolTaskExecutor
}