mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-09-08 10:21:52 +00:00
fix[proxy]: the annotations of the bean of the parent class cannot be scanned
This commit is contained in:
@@ -43,15 +43,11 @@ public class EventRegisterProcessor implements BeanPostProcessor {
|
||||
@Override
|
||||
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
|
||||
var clazz = bean.getClass();
|
||||
var methods = ReflectionUtils.getMethodsByAnnoInPOJOClass(clazz, EventReceiver.class);
|
||||
var methods = ReflectionUtils.getMethodsByAnnotation(clazz, EventReceiver.class);
|
||||
if (ArrayUtils.isEmpty(methods)) {
|
||||
return bean;
|
||||
}
|
||||
|
||||
if (!ReflectionUtils.isPojoClass(clazz)) {
|
||||
logger.warn("事件注册类[{}]不是POJO类,父类的事件接收不会被扫描到", clazz);
|
||||
}
|
||||
|
||||
try {
|
||||
for (var method : methods) {
|
||||
var paramClazzs = method.getParameterTypes();
|
||||
|
||||
Reference in New Issue
Block a user