CommandTargetResolver that uses annotations on the command to identify the methods that provide the Aggregate Identifier of the targeted Aggregate and optionally the expected version of the aggregate.
This implementation expects at least one method (without parameters) or field in the command to be annotated with {@link TargetAggregateIdentifier}. If on a method, the result of the invocation of that method will used as Aggregate Identifier. If on a field, the value held in that field is used.
Similarly, the expected aggregate version may be provided by annotating a method (without parameters) or field with {@link TargetAggregateVersion}. The return value of the method or value held in the field is used as the expected version. Note that the method must return a Long value, or a value that may be parsed as a Long.
@author Allard Buijze
@since 1.2