My team is currently upgrading our axon-based spring boot applications to take advantage of the GraalVM native image generation that comes with the latest major release of spring boot.
we’ve bumped into this issue ourselves as well. I am not sure if this is a bug in Spring Framework, or a configuration error on our side. We’re still figuring that out.
That said, if you were to get Spring AOT working, making it work in Native code is a whole other step. We’ve built Spring-Native support through an extension, but Spring 6 (and Spring Boot 3) redesigned that quite a bit. We haven’t come to testing those changes yet. Your milage may vary.
If you’re interested in the Spring AOT workaround, there are 2 issues that need to be worked around, actually. One is a confirmed issue in Spring Boot that hasn’t been solved yet, the other is the issue I described above.
You can work around these issues by putting the following in a META-INF/spring/aot.factories file:
Working on major refactors required for the Spring 6/Spring Boot 3 migration has been a hectic fortnight.
We have deployed our host of axon applications with Spring AOT successfully so far.
The hack you suggested works for us, but it remains as such. I’m curious about what insights you have uncovered so far.
We also see deprecation errors on application startup…