AxonFramework/extension-reactor

Missing CommandBus in ReactorAutoConfiguration

Closed this issue · 0 comments

Hi, I am experimenting with AxonFramework and noticed that when adding this extension an exception is thrown:

2020-10-02 22:16:49.088  WARN 478880 --- [  restartedMain] onfigReactiveWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'reactiveCommandGateway' defined in class path resource [org/axonframework/extensions/reactor/autoconfig/ReactorAutoConfiguration.class]: Unsatisfied dependency expressed through method 'reactiveCommandGateway' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.axonframework.commandhandling.CommandBus' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

For now I have managed to get past the exception with:

@Lazy
@DependsOn("org.axonframework.commandhandling.CommandBus")
@ConditionalOnClass(name = "reactor.core.publisher.Mono")
public class ReactorAutoConfiguration {...}

UPDATE - The exception is still there.
UPDATE 2 - Exception gone after removing spring-boot-devtools from pom.

Spring Boot: 2.3.4.RELEASE
AxonFramework: 4.4.3
axon-reactor: 4.4.2