I’m trying to use Axon Framework (4.7.3) with Spring Boot. Stuck on DeadlineManager configuration. I supposed that Spring autoconfiguration will do all the job due axon-spring-boot-starter dependency. Like it did for CommandGateway, QueryGateway, etc. But I see that DeadlineManager is null and I unable to inject it.
In Axon documentation I read:
The DeadlineManager can be injected as a resource. It has three flavors: SimpleDeadlineManager , JobRunrDeadlineManager and QuartzDeadlineManager
Spring Boot users will need to define a DeadlineManager bean using one of the available implementations.
Could you please provide example of code DeadlineManager bean definition by SimpleDeadlineManager at least. I do not need fine tuning now. Just simplest and default configuration for proof of concepts.
I found some examples in internet but it based on deprecated AxonConfiguration.
Gerard, thanks for assistance,
But with this Simple Bean code in @Configuration annotated class I got exception:
Error creating bean with name ‘deadlineManager’ defined in class path resource [com/example/idp/domain/configuration/DomainConfiguration.class]:
Failed to instantiate [org.axonframework.deadline.DeadlineManager]: Factory method ‘deadlineManager’ threw exception with message: The ScopeAwareProvider is a hard requirement and should be provided