Annotation Interface TargetEntityId


@Target({METHOD,FIELD,ANNOTATION_TYPE}) @Retention(RUNTIME) public @interface TargetEntityId
Annotation to be placed on a parameter of a field or method of the payload of a Message, which provides the identifier of the target entity when using the AnnotationBasedEntityIdResolver.

See the InjectEntity annotation for more information about the different ways to resolve the entity id when injecting entities into messsage handlers.

Multiple parameters annotated with TargetEntityId are allowed, but only one distinct non-null value may be returned. If multiple non-null values are found that don't match, or no non-null values were found, a

invalid reference
EntityIdResolutionException
is thrown.
Since:
5.0.0
Author:
Mitchell Herrijgers