diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskProperties.java index 84e38a369e..d06b0e4e8c 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskProperties.java @@ -33,7 +33,7 @@ public class TaskProperties { /** * Prefix to use for the names of newly created threads. */ - private String threadNamePrefix = "executor-"; + private String threadNamePrefix = "task-"; public Pool getPool() { return this.pool; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/task/TaskExecutorAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/task/TaskExecutorAutoConfigurationTests.java index be3a7c9bbb..dc23f532e1 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/task/TaskExecutorAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/task/TaskExecutorAutoConfigurationTests.java @@ -132,14 +132,13 @@ public class TaskExecutorAutoConfigurationTests { @Test public void enableAsyncUsesAutoConfiguredOneByDefault() { - this.contextRunner - .withPropertyValues("spring.task.thread-name-prefix=executor-test-") + this.contextRunner.withPropertyValues("spring.task.thread-name-prefix=task-test-") .withUserConfiguration(AsyncConfiguration.class, TestBean.class) .run((context) -> { assertThat(context).hasSingleBean(TaskExecutor.class); TestBean bean = context.getBean(TestBean.class); String text = bean.echo("something").get(); - assertThat(text).contains("executor-test-").contains("something"); + assertThat(text).contains("task-test-").contains("something"); }); } diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 2bbd68963b..54a561bdaa 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -167,7 +167,7 @@ content into your application. Rather, pick only the properties that you need. spring.task.pool.keep-alive=60s # Time limit for which threads may remain idle before being terminated. spring.task.pool.max-size= # Maximum allowed number of threads. If tasks are filling up the queue, the pool can expand up to that size to accommodate the load. Ignored if the queue is unbounded. spring.task.pool.queue-capacity= # Queue capacity. An unbounded capacity does not increase the pool and therefore ignores the "max-size" property. - spring.task.thread-name-prefix=executor- # Prefix to use for the names of newly created threads. + spring.task.thread-name-prefix=task # Prefix to use for the names of newly created threads. # ---------------------------------------- # WEB PROPERTIES