diff --git a/src/main/java/de/thm/arsnova/event/CrudEvent.java b/src/main/java/de/thm/arsnova/event/CrudEvent.java index bf41ce6ff878825458efe939c5b7f59d22572c3d..07d3bbb6fa8ec575b5824c85b1257c533b9b7822 100644 --- a/src/main/java/de/thm/arsnova/event/CrudEvent.java +++ b/src/main/java/de/thm/arsnova/event/CrudEvent.java @@ -2,8 +2,10 @@ package de.thm.arsnova.event; import de.thm.arsnova.model.Entity; import org.springframework.context.ApplicationEvent; +import org.springframework.core.ResolvableType; +import org.springframework.core.ResolvableTypeProvider; -public abstract class CrudEvent<E extends Entity> extends ApplicationEvent { +public abstract class CrudEvent<E extends Entity> extends ApplicationEvent implements ResolvableTypeProvider { public CrudEvent(final E source) { super(source); } @@ -12,4 +14,9 @@ public abstract class CrudEvent<E extends Entity> extends ApplicationEvent { public E getSource() { return (E) super.getSource(); } + + @Override + public ResolvableType getResolvableType() { + return ResolvableType.forClassWithGenerics(getClass(), source.getClass()); + } }