You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With no attributes the condition matches by return type (ExecutorService). Host applications routinely define their own executor beans - dispatchers, ScheduledExecutorService-based SSE heartbeat schedulers, pub-sub workers (ScheduledExecutorService is a subtype, so it is a candidate too). Because user configuration is registered before auto-configuration, any single one of them suppresses agentExecutorPool.
requestHandler (parameter 5) and restHandler then inject ExecutorServiceby type, without a qualifier, so the application fails to start:
UnsatisfiedDependencyException: Error creating bean with name 'requestHandler'
... parameter 5 ... NoUniqueBeanDefinitionException: expected single matching bean
but found 3: spaceAiDispatcherExecutor,spaceSseHeartbeatScheduler,spaceSsePubSubExecutor
The parameter-name hint in that message is a red herring: the parameter is named pool and no bean of that name exists.
Expected
The starter's own executor should be created and used regardless of unrelated ExecutorService beans in the host, while a host can still override it explicitly.
Fix
Match by bean name: @Bean(name = "agentExecutorPool", destroyMethod = "shutdownNow") plus @ConditionalOnMissingBean(name = "agentExecutorPool").
Qualify both injection points: @Qualifier("agentExecutorPool") on the requestHandler and restHandlerExecutorService parameters.
Both halves are required: without (1) the pool is never created, without (2) the injection stays ambiguous.
Workaround before the fix
Declare a @PrimaryExecutorService bean in the host with the same settings.
Activity
Zhoujie628 commentedon Oct 22, 2026
Superseded by #98: same report filed from the account that authored the fix, PR is #99.