AxonFramework and Spring boot

Hi,
Thanks your teams’ work on axonframework. Our project are using the framework. It is very helpful.

But we have met some problems when integrate axonframework 3.x into our project which is based on springboot.
The first problem is that java dynamic proxy is not work as the default. we have to use the annotation @Scope(proxyMode = ScopedProxyMode.TARGET_CLASS) with @Bean. The it works.
The other problem is that spring cache is not work now.

We are not sure whether the problem is caused by axonframework. Any way I’m writting to ask for some help. Have you ever met some problem similar like our’s? Does anonframework have any auto configuration with spring?

If you have any suggestion, please tell me. I’m appreciate for your reading my email.

Thanks a lot.

Hi,

you can use the Axon Spring Boot started for Spring Boot Autoconfiguration:

<dependency>
    <groupId>org.axonframework</groupId>
    <artifactId>axon-spring-boot-starter</artifactId>
    <version>3.0.6</version>
</dependency>

I have never encountered a problem with proxying in combination with Axon. As far as I recall, Axon 3 doesn’t depend on proxying itself. It is possible that another library tries to proxy beans (possible those defined by Axon). Proxy TARGET_CLASS is needed to create proxies for Classes (as opposed to Interfaces, which are the only proxies Java Dynamic Proxy supports).

Hope this helps.
Cheers,

Allard