No handler was subscribed to command [commands.CreateAccountCommand]


I’ve been following along with your axon 3.0 video: I created the application, but when I get to starting the spring boot main, I get a “No handler was subscribed to command [commands.CreateAccountCommand]” exception.

Not really sure what is wrong, because the only difference seems to be that I simplified things a bit & @EnableAxonAutoConfiguration seems to have been replaced by @EnableAxon.

Any ideas?



What package are all your classes in? More importantly, is your aggregate in a subpackage of the one your Application class is in?

If you use Spring Boot, you better off including the axon-spring-boot-starter instead of using the annotation.



Well, that was a stupid mistake. The aggregate was indeed not in a subpackage of the application class… I also removed the annotation and added axon-spring-boot-starter.