@Configuration very strange behavior, Spring Boot fail?

If I use separated class to configure Axon with Spring Boot in the same package of SpringBootApp:

`

@EnableAxon
@Configuration
public class AxonConfiguration {

@Primary
@Bean(destroyMethod = “shutdown”)
public CommandBus commandBus() {
return new AsynchronousCommandBus();
}

@Bean
public CommandBus simpleCommandBus() {
return new SimpleCommandBus();
}

@Bean
public EventStorageEngine eventStorageEngine() {
return new InMemoryEventStorageEngine();
}

}

`

The configuration won’t read

if instead I renami it as XAxonConfiguration it works.

it seems as Spring Boot call the alfabetically and won’t read config classes before the App Class.

I correct Myself, and it is Axon strange behavior, it is the precise name AxonConfiguration that cannot go,
I changed to AxonConfig and it works, mayb it can be written on docs.

Hmm… interesting. The Axon Config does create an @Configuration class called AxonConfig. Since Config beans are beans, their bean name defaults to the simple classname. So probably yours overwrites the one by Axon.

I guess I can configure a name the AxonConfiguration that is very (very!) unlikely to be chosen in an application.

Thanks for reporting!