Use @EnableAxon or not?

The Axon 3 documentation recommends putting @EnableAxon on a Spring configuration class to automatically locate components and set up reasonable defaults. But the Javadoc for @EnableAxon recommends against using it and warns that it will probably be removed. Which advice should I believe?

One twist is that although my application uses Spring, it isn't built on top of Spring Boot. The @EnableAxon Javadoc seems to imply that Spring Boot is going to be a requirement for automatic configuration at some point (at least that's how I interpret the fact that it recommends using a Spring-Boot-specific module). Is that the case? If so, is my best bet to ignore all the autoconfiguration stuff entirely and instead directly call the configuration API to explicitly set everything up?

-Steve

Hi Steve,

at the moment, we’re not entirely sure what to do with the @EnableAxon annotation, yet. It was a good idea at the time (RC1, etc), but the feedback from Pivotal/Spring was pretty clear: @EnableAxon(AutoConfiguration) isn’t autoconfiguration.
The concept of autoconfiguration is considered part of Spring boot. All the implementations of @Conditional are in this spring boot autoconfiguration module (even though @Conditional itself isn’t).

I’m currently in the process of (re)writing the Spring related chapters of the documentation. @EnableAxon will not be mentioned in there, until we have decided what to do with it. Chances are big it’s going to be removed.

Note that you don’t have to use full-fledged Spring-boot if you don’t want to. You can always create WAR files and you decide which Spring-Boot starters you want to include in your application.

Cheers,

Allard