Skip to content

Spring Boot 3.4: TaskExecutor no longer auto-configured due to other Executor beans from AbstractMessageBrokerConfiguration #43295

@SebastianS90

Description

@SebastianS90

After upgrading to Spring Boot 3.4, the application does not start:

(one of my own classes) required a bean of type 'org.springframework.core.task.TaskExecutor' that could not be found.

The reason why this bean is missing and not created by org.springframework.boot.autoconfigure.task.TaskExecutorConfigurations:

TaskExecutorConfigurations.TaskExecutorConfiguration:
      Did not match:
         - @ConditionalOnMissingBean (types: java.util.concurrent.Executor; SearchStrategy: all) found beans of type 'java.util.concurrent.Executor' clientInboundChannelExecutor, clientOutboundChannelExecutor, brokerChannelExecutor (OnBeanCondition)

Auto configuration is here:

class TaskExecutorConfigurations {
@Configuration(proxyBeanMethods = false)
@ConditionalOnMissingBean(Executor.class)
static class TaskExecutorConfiguration {

One of the existing beans is created here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions