I’m working on migrating an existent app from Java to Groovy.
Previously it has been working – being in pure Java.
There’s a lot of @EventHandler-annotated methods.
Everything is wired with Spring and <axon:annotation-config />
But only those in aggregate roots are called.
- I have a @CompileStatic class F extends AbstractAnnotatedAggregateRoot
- A method in class calls apply(K k)
- There’s an @EventHandler handle(K k), and it is called
- I have a @CompileStatic @Component class BooDtoMapper
- There’s an @EventHandler handle(K k)
- It never gets called!
I’m really stuck. Even don’t understand how to debug it.
The first class is not a bean, but it’s an aggregate root. It works.
The second class is a bean, not an aggregate. It do exist in AppContext, so bean is instantiated.
It was working in Java.
All the groovy code is compiled statically.
What should I do? Please help!