Fix detection of @DomainEvents and @AfterDomainEventPublication on native.
We now unconditionally process the aggregate root types declared on repositories for @Reflective annotations, which @DE and @ADEP got meta-annotated with. Fixes #2939.
This commit is contained in:
@@ -20,6 +20,8 @@ import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import org.springframework.aot.hint.annotation.Reflective;
|
||||
|
||||
/**
|
||||
* Annotation to be used on a method of a Spring Data managed aggregate to get invoked after the events of an aggregate
|
||||
* have been published.
|
||||
@@ -29,8 +31,7 @@ import java.lang.annotation.Target;
|
||||
* @since 1.13
|
||||
* @soundtrack Benny Greb - September (Moving Parts Live)
|
||||
*/
|
||||
@Reflective
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ ElementType.METHOD, ElementType.ANNOTATION_TYPE })
|
||||
public @interface AfterDomainEventPublication {
|
||||
|
||||
}
|
||||
public @interface AfterDomainEventPublication {}
|
||||
|
||||
@@ -20,6 +20,8 @@ import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import org.springframework.aot.hint.annotation.Reflective;
|
||||
|
||||
/**
|
||||
* {@link DomainEvents} can be used on methods of aggregate roots managed by Spring Data repositories to publish the
|
||||
* events returned by that method as Spring application events.
|
||||
@@ -30,7 +32,7 @@ import java.lang.annotation.Target;
|
||||
* @since 1.13
|
||||
* @soundtrack Benny Greb - Soulfood (Moving Parts Live)
|
||||
*/
|
||||
@Reflective
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ ElementType.METHOD, ElementType.ANNOTATION_TYPE })
|
||||
public @interface DomainEvents {
|
||||
}
|
||||
public @interface DomainEvents {}
|
||||
|
||||
Reference in New Issue
Block a user