In most cases, the name of the task will be the application name as configured via Spring
Boot. However, there are some cases, where you may want to map the run of a task to a
different name. Spring Data Flow is an example of this (where you want the task to be run
with the name of the task definition). Because of this, we offer the ability to customize
how the task is named via the TaskNameResolver
interface.
By default, Spring Cloud Task provides the SimpleTaskNameResolver
which will use the
following options (in order of precedence):
spring.cloud.task.name
.ApplicationContext#getId
).