【8.3.0】【event】更新事件发布的过程

master
stylefeng 2024-08-15 22:59:18 +08:00
parent 785ace7ba1
commit 07db019f30
1 changed files with 9 additions and 6 deletions

View File

@ -67,7 +67,9 @@ public class BusinessEventPublisher {
// 如果发布事件的时候包含参数则判断method的第一个参数是否和businessObject的class一样不一样则不调用
else {
if (parameterClassType != null && parameterClassType.equals(businessObject.getClass())) {
if (parameterClassType != null) {
if (parameterClassType.equals(businessObject.getClass())
|| parameterClassType.isAssignableFrom(businessObject.getClass())) {
try {
listenerMethod.invoke(bean, businessObject);
} catch (IllegalAccessException | InvocationTargetException e) {
@ -78,5 +80,6 @@ public class BusinessEventPublisher {
}
}
}
}
}