From the @EventHandler documentation:
When using Spring and <axon:annotation-config/>
is declared, any other parameters will
- resolve to autowired beans, if exactly one autowire candidate is available in the application context. This allows
- you to inject resources directly into
@EventHandler
annotated methods.
This is very convenient, is this also possible for @CommandHandler? The documentation seems to say no.
From the same documentation:
The way I understand this is that this should work without the @Timestamp annotation, but for me it only works with the annotation.
I get this message without the annotation:
On method public void com.bridgebig.user.query.UserEventHandler.handle(com.bridgebig.user.event.UserCreatedEvent,org.joda.time.DateTime), parameter 2 is invalid. It is not of any format supported by a providedParameterValueResolver.